/* ================================================
   archetype.moe v2 - Styles
   Pastel-iridescent horizontal-scroll gallery
   ================================================ */

/* --- Reset & Base --- */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    width: 100%;
    height: 100%;
    overflow: hidden;
    font-family: 'Cormorant Garamond', serif;
    background: #E8D5F0;
}

/* --- Horizontal Scroll Container --- */
.scroll-container {
    display: flex;
    width: 100%;
    height: 100vh;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
}

.scroll-container::-webkit-scrollbar {
    display: none;
}

.scroll-container {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/* --- Panel Base --- */
.panel {
    min-width: 100vw;
    height: 100vh;
    scroll-snap-align: start;
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
}

/* --- Star Particles --- */
.stars-field {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 1;
}

.star-particle {
    position: absolute;
    width: 0;
    height: 0;
    opacity: 0;
    transform: scale(0);
}

.star-particle::before,
.star-particle::after {
    content: '';
    position: absolute;
    background: currentColor;
}

.star-particle::before {
    width: 100%;
    height: 30%;
    top: 35%;
    left: 0;
    border-radius: 50%;
}

.star-particle::after {
    width: 30%;
    height: 100%;
    left: 35%;
    top: 0;
    border-radius: 50%;
}

.star-particle.visible {
    opacity: 1;
    transform: scale(1);
    transition: opacity 0.4s ease, transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes starRotate3 {
    from { transform: scale(1) rotate(0deg); }
    to { transform: scale(1) rotate(360deg); }
}
@keyframes starRotate5 {
    from { transform: scale(1) rotate(0deg); }
    to { transform: scale(1) rotate(360deg); }
}
@keyframes starRotate7 {
    from { transform: scale(1) rotate(0deg); }
    to { transform: scale(1) rotate(360deg); }
}
@keyframes starRotate11 {
    from { transform: scale(1) rotate(0deg); }
    to { transform: scale(1) rotate(360deg); }
}

/* --- Opening Panel --- */
.panel-opening {
    background: #E8D5F0;
    background-image: linear-gradient(to right, #E8D5F0, #FFD1DC);
    background-size: 0% 100%;
    background-repeat: no-repeat;
    background-position: right center;
    display: flex;
    align-items: center;
    justify-content: center;
}

.panel-opening.animated {
    animation: openingGradient 1.2s ease-out forwards;
}

@keyframes openingGradient {
    from { background-size: 0% 100%; }
    to { background-size: 100% 100%; }
}

.opening-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 2;
    position: relative;
}

.logotype {
    font-family: 'Quicksand', sans-serif;
    font-weight: 700;
    font-size: clamp(32px, 5vw, 64px);
    color: #C71585;
    -webkit-text-stroke: 2px #FFF5F9;
    paint-order: stroke fill;
    letter-spacing: 0.03em;
    clip-path: inset(0 100% 0 0);
    opacity: 0;
    text-shadow: 0 0 40px rgba(199, 21, 133, 0.2);
}

.logotype.reveal {
    animation: clipReveal 0.8s ease-out forwards;
}

@keyframes clipReveal {
    from {
        clip-path: inset(0 100% 0 0);
        opacity: 1;
    }
    to {
        clip-path: inset(0 0% 0 0);
        opacity: 1;
    }
}

.tagline {
    font-family: 'Zen Maru Gothic', sans-serif;
    font-weight: 400;
    font-size: clamp(14px, 1.8vw, 20px);
    color: #C71585;
    margin-top: 16px;
    opacity: 0;
}

.tagline.fade-in {
    animation: fadeInUp 0.6s ease-out forwards;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.scroll-arrow {
    position: absolute;
    right: 40px;
    top: 50%;
    transform: translateY(-50%);
    opacity: 0;
    cursor: pointer;
}

.scroll-arrow.pulse {
    opacity: 1;
    animation: arrowPulse 1.5s ease-in-out infinite;
}

@keyframes arrowPulse {
    0%, 100% { transform: translateY(-50%) translateX(0); }
    50% { transform: translateY(-50%) translateX(10px); }
}

/* --- Archetype Panel --- */
.panel-archetype {
    display: flex;
    align-items: center;
    justify-content: center;
}

.panel-archetype[data-archetype="tsundere"] {
    background: linear-gradient(135deg, #FFD1DC, #E8D5F0);
}
.panel-archetype[data-archetype="yandere"] {
    background: linear-gradient(135deg, #FFD1DC, #F0D5E8);
}
.panel-archetype[data-archetype="kuudere"] {
    background: linear-gradient(135deg, #D5E8F0, #E8D5F0);
}
.panel-archetype[data-archetype="dandere"] {
    background: linear-gradient(135deg, #E8D5F0, #D5F0E8);
}
.panel-archetype[data-archetype="genki"] {
    background: linear-gradient(135deg, #FFD1DC, #FFEFD5);
}
.panel-archetype[data-archetype="ojousama"] {
    background: linear-gradient(135deg, #E8D5F0, #F0E8D5);
}
.panel-archetype[data-archetype="imouto"] {
    background: linear-gradient(135deg, #FFD1DC, #D5E0F0);
}
.panel-archetype[data-archetype="megane"] {
    background: linear-gradient(135deg, #D5E8F0, #E8E0F0);
}

.panel-archetype .panel-content {
    filter: saturate(1);
    transition: filter 0.4s ease;
}

.panel-archetype.in-view .panel-content {
    filter: saturate(1.15);
}

.archetype-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 60vw;
    max-width: 800px;
    z-index: 2;
    position: relative;
}

.archetype-header {
    text-align: left;
    width: 100%;
    opacity: 0;
    transform: translateX(-40px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.panel-archetype.in-view .archetype-header {
    opacity: 1;
    transform: translateX(0);
}

.archetype-name {
    font-family: 'Quicksand', sans-serif;
    font-weight: 700;
    font-size: clamp(28px, 5vw, 72px);
    color: #C71585;
    letter-spacing: 0.03em;
    line-height: 1.1;
}

.archetype-name-jp {
    font-family: 'Zen Maru Gothic', sans-serif;
    font-weight: 400;
    font-size: clamp(14px, 1.8vw, 20px);
    color: #C71585;
    opacity: 0.7;
    margin-top: 4px;
}

/* --- Iridescent Circle Frame --- */
.archetype-frame {
    margin: 32px 0;
    opacity: 0;
    transform: scale(0.8);
    transition: opacity 0.6s ease, transform 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    transition-delay: 0.15s;
}

.panel-archetype.in-view .archetype-frame {
    opacity: 1;
    transform: scale(1);
}

.iridescent-circle {
    width: min(50vh, 50vw);
    height: min(50vh, 50vw);
    max-width: 400px;
    max-height: 400px;
    border-radius: 50%;
    border: 8px solid #FF69B4;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 245, 249, 0.3);
    position: relative;
    animation: none;
    box-shadow: 0 0 30px rgba(255, 105, 180, 0.4);
}

.panel-archetype.in-view .iridescent-circle {
    animation: hueRotate 6s linear infinite, glowPulse 6s ease-in-out infinite;
}

@keyframes hueRotate {
    from { filter: hue-rotate(0deg); }
    to { filter: hue-rotate(360deg); }
}

@keyframes glowPulse {
    0%, 100% { box-shadow: 0 0 30px rgba(255, 105, 180, 0.4); }
    50% { box-shadow: 0 0 50px rgba(127, 255, 212, 0.5); }
}

/* --- Archetype Description --- */
.archetype-desc {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 400;
    font-style: italic;
    font-size: clamp(16px, 2vw, 22px);
    color: #191970;
    text-align: center;
    max-width: 500px;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.4s ease, transform 0.4s ease;
    transition-delay: 0.3s;
}

.panel-archetype.in-view .archetype-desc {
    opacity: 1;
    transform: translateY(0);
}

/* --- Ribbon Banner --- */
.ribbon-banner {
    position: absolute;
    top: 60px;
    right: -20px;
    background: #C71585;
    color: #FFF5F9;
    font-family: 'Quicksand', sans-serif;
    font-weight: 700;
    font-size: 14px;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    padding: 8px 40px 8px 24px;
    transform: rotate(30deg) translateX(60px);
    opacity: 0;
    z-index: 3;
    transition: transform 0.3s ease, opacity 0.3s ease;
    transition-delay: 0.4s;
}

.ribbon-banner::before {
    content: '';
    position: absolute;
    left: -12px;
    top: 0;
    width: 0;
    height: 0;
    border-top: 16px solid transparent;
    border-bottom: 16px solid transparent;
    border-right: 12px solid #C71585;
}

.ribbon-banner::after {
    content: '';
    position: absolute;
    right: 0;
    bottom: -8px;
    width: 0;
    height: 0;
    border-left: 12px solid #9e1068;
    border-bottom: 8px solid transparent;
}

.panel-archetype.in-view .ribbon-banner {
    transform: rotate(15deg) translateX(0);
    opacity: 1;
}

/* ============================
   Archetype-Specific Floating Motifs
   ============================ */

.archetype-motifs {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 1;
    overflow: hidden;
}

.motif-float {
    position: absolute;
    opacity: 0;
    transition: opacity 0.6s ease;
}

.panel-archetype.in-view .motif-float {
    opacity: 0.25;
}

/* Hearts for Tsundere & Yandere */
.motif-heart {
    width: 20px;
    height: 20px;
}

.motif-heart::before,
.motif-heart::after {
    content: '';
    position: absolute;
    width: 12px;
    height: 12px;
    border-radius: 50% 50% 0 0;
    background: #FF69B4;
}

.motif-heart::before {
    left: 0;
    transform: rotate(-45deg);
    transform-origin: bottom right;
}

.motif-heart::after {
    left: 6px;
    transform: rotate(45deg);
    transform-origin: bottom left;
}

/* Snowflake minis for Kuudere */
.motif-snowflake-mini {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 2px solid #87CEEB;
    background: transparent;
}

.motif-snowflake-mini::before,
.motif-snowflake-mini::after {
    content: '';
    position: absolute;
    width: 2px;
    height: 16px;
    background: #87CEEB;
    left: 50%;
    top: 0;
    transform: translateX(-50%);
}

.motif-snowflake-mini::after {
    transform: translateX(-50%) rotate(60deg);
}

/* Book minis for Dandere */
.motif-book-mini {
    width: 14px;
    height: 18px;
    border: 2px solid #C71585;
    border-radius: 1px 3px 3px 1px;
    background: rgba(232, 213, 240, 0.4);
}

.motif-book-mini::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 3px;
    height: 100%;
    background: #C71585;
    border-radius: 1px 0 0 1px;
}

/* Star minis for Genki & Imouto */
.motif-star-mini {
    width: 18px;
    height: 18px;
    background: #FFD700;
    clip-path: polygon(
        50% 0%, 62% 38%, 100% 50%, 62% 62%,
        50% 100%, 38% 62%, 0% 50%, 38% 38%
    );
}

/* Ribbon minis for Ojou-sama */
.motif-ribbon-mini {
    width: 20px;
    height: 8px;
    background: #E8D5F0;
    border: 1px solid #C71585;
    border-radius: 2px;
    position: relative;
}

.motif-ribbon-mini::before,
.motif-ribbon-mini::after {
    content: '';
    position: absolute;
    top: 0;
    width: 0;
    height: 0;
    border-top: 4px solid transparent;
    border-bottom: 4px solid transparent;
}

.motif-ribbon-mini::before {
    left: -6px;
    border-right: 6px solid #C71585;
}

.motif-ribbon-mini::after {
    right: -6px;
    border-left: 6px solid #C71585;
}

/* Circle minis for Megane */
.motif-circle-mini {
    width: 14px;
    height: 14px;
    border: 2px solid #87CEEB;
    border-radius: 50%;
    background: transparent;
}

/* Floating motif animations */
@keyframes motifDrift1 {
    0% { transform: translate(0, 0) rotate(0deg); }
    33% { transform: translate(15px, -20px) rotate(120deg); }
    66% { transform: translate(-10px, 10px) rotate(240deg); }
    100% { transform: translate(0, 0) rotate(360deg); }
}

@keyframes motifDrift2 {
    0% { transform: translate(0, 0) rotate(0deg); }
    33% { transform: translate(-20px, 15px) rotate(-120deg); }
    66% { transform: translate(10px, -10px) rotate(-240deg); }
    100% { transform: translate(0, 0) rotate(-360deg); }
}

@keyframes motifDrift3 {
    0% { transform: translate(0, 0) rotate(0deg); }
    50% { transform: translate(12px, 18px) rotate(180deg); }
    100% { transform: translate(0, 0) rotate(360deg); }
}

.motif-float:nth-child(1) {
    top: 10%;
    left: 8%;
    animation: motifDrift1 11s ease-in-out infinite;
}

.motif-float:nth-child(2) {
    top: 75%;
    right: 12%;
    left: auto;
    animation: motifDrift2 13s ease-in-out infinite;
}

.motif-float:nth-child(3) {
    top: 20%;
    right: 6%;
    left: auto;
    animation: motifDrift3 9s ease-in-out infinite;
}

.motif-float:nth-child(4) {
    bottom: 15%;
    left: 5%;
    top: auto;
    animation: motifDrift1 15s ease-in-out infinite;
}

.motif-float:nth-child(5) {
    top: 55%;
    left: 15%;
    animation: motifDrift2 10s ease-in-out infinite;
}

/* ============================
   Archetype Icons (CSS Only)
   ============================ */

.archetype-icon {
    width: 48px;
    height: 48px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Tsundere - Two overlapping hearts */
.icon-tsundere {
    width: 64px;
    height: 64px;
}

.icon-tsundere .heart {
    position: absolute;
    width: 30px;
    height: 30px;
}

.icon-tsundere .heart::before,
.icon-tsundere .heart::after {
    content: '';
    position: absolute;
    width: 30px;
    height: 30px;
    border-radius: 50% 50% 0 0;
    background: #FF69B4;
}

.icon-tsundere .heart::before {
    left: -8px;
    transform: rotate(-45deg);
    transform-origin: bottom right;
}

.icon-tsundere .heart::after {
    left: 8px;
    transform: rotate(45deg);
    transform-origin: bottom left;
}

.icon-tsundere .heart-1 {
    top: 8px;
    left: 4px;
    filter: drop-shadow(0 2px 4px rgba(199, 21, 133, 0.3));
}

.icon-tsundere .heart-2 {
    top: 12px;
    left: 20px;
    transform: rotate(180deg);
    opacity: 0.6;
}

/* Yandere - Cracked heart */
.icon-yandere {
    width: 64px;
    height: 64px;
}

.heart-cracked {
    position: relative;
    width: 48px;
    height: 48px;
}

.heart-cracked .heart-half {
    position: absolute;
    width: 48px;
    height: 48px;
}

.heart-cracked .heart-half::before,
.heart-cracked .heart-half::after {
    content: '';
    position: absolute;
    width: 24px;
    height: 24px;
    border-radius: 50% 50% 0 0;
    background: #FF69B4;
}

.heart-cracked .heart-half.left::before {
    left: 3px;
    top: 4px;
    transform: rotate(-45deg);
    transform-origin: bottom right;
}

.heart-cracked .heart-half.left::after {
    left: 16px;
    top: 4px;
    transform: rotate(45deg);
    transform-origin: bottom left;
}

.heart-cracked .crack-line {
    position: absolute;
    top: 10px;
    left: 50%;
    width: 3px;
    height: 28px;
    background: #C71585;
    transform: translateX(-50%) rotate(5deg);
    z-index: 1;
}

.heart-cracked .crack-line::before,
.heart-cracked .crack-line::after {
    content: '';
    position: absolute;
    width: 8px;
    height: 2px;
    background: #C71585;
}

.heart-cracked .crack-line::before {
    top: 8px;
    left: -4px;
    transform: rotate(-30deg);
}

.heart-cracked .crack-line::after {
    top: 18px;
    left: 0;
    transform: rotate(25deg);
}

/* Kuudere - Snowflake */
.icon-kuudere {
    width: 64px;
    height: 64px;
}

.snowflake {
    position: relative;
    width: 48px;
    height: 48px;
}

.snowflake .snow-arm {
    position: absolute;
    width: 4px;
    height: 44px;
    background: #87CEEB;
    left: 50%;
    top: 50%;
    transform-origin: center center;
    border-radius: 2px;
    filter: drop-shadow(0 0 4px rgba(135, 206, 235, 0.5));
}

.snowflake .snow-arm:nth-child(1) {
    transform: translate(-50%, -50%) rotate(0deg);
}

.snowflake .snow-arm:nth-child(2) {
    transform: translate(-50%, -50%) rotate(60deg);
}

.snowflake .snow-arm:nth-child(3) {
    transform: translate(-50%, -50%) rotate(120deg);
}

.snowflake .snow-arm::before,
.snowflake .snow-arm::after {
    content: '';
    position: absolute;
    width: 3px;
    height: 12px;
    background: #87CEEB;
    border-radius: 2px;
}

.snowflake .snow-arm::before {
    top: 4px;
    left: -3px;
    transform: rotate(40deg);
}

.snowflake .snow-arm::after {
    top: 4px;
    right: -3px;
    transform: rotate(-40deg);
}

/* Dandere - Closed book */
.icon-dandere {
    width: 64px;
    height: 64px;
}

.book-closed {
    position: relative;
    width: 36px;
    height: 46px;
}

.book-cover {
    width: 100%;
    height: 100%;
    background: #E8D5F0;
    border: 3px solid #C71585;
    border-radius: 2px 6px 6px 2px;
}

.book-pages {
    position: absolute;
    right: 4px;
    top: 4px;
    width: 3px;
    height: calc(100% - 8px);
    background: repeating-linear-gradient(
        to bottom,
        #FFF5F9 0px,
        #FFF5F9 2px,
        #E8D5F0 2px,
        #E8D5F0 3px
    );
}

.book-spine {
    position: absolute;
    left: 0;
    top: 0;
    width: 6px;
    height: 100%;
    background: #C71585;
    border-radius: 2px 0 0 2px;
}

/* Genki - Starburst */
.icon-genki {
    width: 64px;
    height: 64px;
}

.starburst {
    position: relative;
    width: 48px;
    height: 48px;
}

.starburst::before,
.starburst::after {
    content: '';
    position: absolute;
    inset: 0;
    background: #FFD700;
    clip-path: polygon(
        50% 0%, 62% 38%, 100% 50%, 62% 62%,
        50% 100%, 38% 62%, 0% 50%, 38% 38%
    );
    filter: drop-shadow(0 0 6px rgba(255, 215, 0, 0.5));
}

.starburst::after {
    transform: rotate(22.5deg);
    opacity: 0.7;
}

/* Ojou-sama - Crown */
.icon-ojousama {
    width: 64px;
    height: 64px;
}

.crown {
    position: relative;
    width: 52px;
    height: 36px;
}

.crown-base {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 12px;
    background: #FFD700;
    border-radius: 0 0 4px 4px;
    filter: drop-shadow(0 2px 4px rgba(255, 215, 0, 0.4));
}

.crown-point {
    position: absolute;
    bottom: 10px;
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-bottom: 22px solid #FFD700;
}

.crown-point:nth-child(1) { left: 0px; }
.crown-point:nth-child(2) { left: 10px; }
.crown-point:nth-child(3) { left: 20px; }
.crown-point:nth-child(4) { left: 30px; }
.crown-point:nth-child(5) { left: 40px; }

/* Imouto - Star within star */
.icon-imouto {
    width: 64px;
    height: 64px;
}

.star-nested {
    position: relative;
    width: 48px;
    height: 48px;
}

.star-outer {
    position: absolute;
    inset: 0;
    background: #FF69B4;
    clip-path: polygon(
        50% 0%, 61% 35%, 98% 35%, 68% 57%,
        79% 91%, 50% 70%, 21% 91%, 32% 57%,
        2% 35%, 39% 35%
    );
    filter: drop-shadow(0 0 6px rgba(255, 105, 180, 0.4));
}

.star-inner {
    position: absolute;
    top: 25%;
    left: 25%;
    width: 50%;
    height: 50%;
    background: #FFD700;
    clip-path: polygon(
        50% 0%, 61% 35%, 98% 35%, 68% 57%,
        79% 91%, 50% 70%, 21% 91%, 32% 57%,
        2% 35%, 39% 35%
    );
}

/* Megane - Glasses */
.icon-megane {
    width: 72px;
    height: 48px;
}

.glasses {
    position: relative;
    width: 64px;
    height: 32px;
}

.lens {
    position: absolute;
    top: 0;
    width: 26px;
    height: 26px;
    border: 3px solid #87CEEB;
    border-radius: 50%;
    filter: drop-shadow(0 0 4px rgba(135, 206, 235, 0.4));
}

.lens-left {
    left: 2px;
}

.lens-right {
    right: 2px;
}

.bridge {
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    width: 10px;
    height: 3px;
    background: #87CEEB;
    border-radius: 2px;
}

/* =============================
   Constellation Panel
   ============================= */
.panel-constellation {
    background: #191970;
    display: flex;
    align-items: center;
    justify-content: center;
}

.constellation-bg-stars {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 0;
}

.constellation-bg-star {
    position: absolute;
    width: 2px;
    height: 2px;
    background: #FFF5F9;
    border-radius: 50%;
}

@keyframes twinkle {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 1; }
}

.constellation-content {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
}

.constellation-svg {
    width: 80%;
    height: 80%;
    max-width: 1000px;
}

.constellation-lines line {
    stroke: #87CEEB;
    stroke-width: 1.5;
    opacity: 0.3;
    stroke-dasharray: 500;
    stroke-dashoffset: 500;
    transition: opacity 0.3s ease, stroke 0.3s ease, stroke-width 0.3s ease;
}

.panel-constellation.in-view .constellation-lines line {
    animation: drawLine 0.8s ease-out forwards;
}

.panel-constellation.in-view .constellation-lines line:nth-child(1) { animation-delay: 0s; }
.panel-constellation.in-view .constellation-lines line:nth-child(2) { animation-delay: 0.1s; }
.panel-constellation.in-view .constellation-lines line:nth-child(3) { animation-delay: 0.2s; }
.panel-constellation.in-view .constellation-lines line:nth-child(4) { animation-delay: 0.3s; }
.panel-constellation.in-view .constellation-lines line:nth-child(5) { animation-delay: 0.4s; }
.panel-constellation.in-view .constellation-lines line:nth-child(6) { animation-delay: 0.5s; }
.panel-constellation.in-view .constellation-lines line:nth-child(7) { animation-delay: 0.6s; }
.panel-constellation.in-view .constellation-lines line:nth-child(8) { animation-delay: 0.7s; }
.panel-constellation.in-view .constellation-lines line:nth-child(9) { animation-delay: 0.8s; }
.panel-constellation.in-view .constellation-lines line:nth-child(10) { animation-delay: 0.9s; }
.panel-constellation.in-view .constellation-lines line:nth-child(11) { animation-delay: 1.0s; }
.panel-constellation.in-view .constellation-lines line:nth-child(12) { animation-delay: 1.1s; }

@keyframes drawLine {
    to {
        stroke-dashoffset: 0;
    }
}

.constellation-node {
    cursor: pointer;
}

.node-glow {
    fill: #FF69B4;
    opacity: 0.2;
    animation: nodePulse 2s ease-in-out infinite;
}

.node-core {
    fill: #FFF5F9;
    filter: drop-shadow(0 0 6px #FF69B4);
}

@keyframes nodePulse {
    0%, 100% { r: 18; opacity: 0.2; }
    50% { r: 22; opacity: 0.4; }
}

.node-label {
    font-family: 'Quicksand', sans-serif;
    font-size: 14px;
    fill: #FFF5F9;
    text-anchor: middle;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.constellation-node:hover .node-label,
.constellation-node.active .node-label {
    opacity: 1;
}

.constellation-node:hover .node-glow {
    opacity: 0.6;
    fill: #7FFFD4;
}

.constellation-node:hover .node-core {
    filter: drop-shadow(0 0 10px #7FFFD4);
}

.constellation-title {
    position: absolute;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%);
    font-family: 'Quicksand', sans-serif;
    font-weight: 700;
    font-size: clamp(20px, 3vw, 36px);
    color: #FFF5F9;
    white-space: nowrap;
    letter-spacing: 0.05em;
    opacity: 0;
    transition: opacity 0.8s ease;
    transition-delay: 1.2s;
}

.panel-constellation.in-view .constellation-title {
    opacity: 1;
}

.constellation-subtitle {
    position: absolute;
    bottom: 52px;
    left: 50%;
    transform: translateX(-50%);
    font-family: 'Cormorant Garamond', serif;
    font-style: italic;
    font-size: clamp(14px, 1.5vw, 20px);
    color: #87CEEB;
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.8s ease;
    transition-delay: 1.6s;
}

.panel-constellation.in-view .constellation-subtitle {
    opacity: 1;
}

/* Constellation slow rotation: 1deg per 3s = 360deg per 1080s */
.panel-constellation.in-view .constellation-svg {
    animation: constellationSpin 1080s linear infinite;
}

@keyframes constellationSpin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* =============================
   Constellation hover highlight
   ============================= */
.constellation-lines line.highlight {
    opacity: 1;
    stroke: #7FFFD4;
    stroke-width: 2.5;
}

/* =============================
   Navigation Bar
   ============================= */
.nav-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 100;
    padding: 12px 0 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    pointer-events: none;
}

.nav-dots {
    display: flex;
    gap: 12px;
    margin-bottom: 8px;
    pointer-events: auto;
}

.nav-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: 2px solid #C71585;
    background: transparent;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0;
}

.nav-dot.active {
    background: #C71585;
    transform: scale(1.4);
    box-shadow: 0 0 10px rgba(199, 21, 133, 0.5);
}

.nav-dot:hover {
    background: #7FFFD4;
    border-color: #7FFFD4;
}

.progress-bar {
    width: 100%;
    height: 4px;
    background: rgba(232, 213, 240, 0.3);
}

.progress-fill {
    width: 0%;
    height: 100%;
    background: linear-gradient(to right, #FF69B4, #87CEEB);
    transition: width 0.15s ease;
}
