/* =========================================
   1. 상단 파스텔 스크롤 바
   ========================================= */

/* 상단 컨테이너 배경 */
#scroll-progress-container {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 6px !important;
    background: rgba(255, 255, 255, 0.05) !important;
    z-index: 999999 !important;
    pointer-events: none !important;
}

/* 푸른 파스텔 스크롤 바 본체 */
#scroll-progress-bar {
    position: relative !important;
    width: 0%; /* JS에서 업데이트됨 */
    height: 100% !important;
    background: linear-gradient(90deg, #a1c4fd, #c2e9fb, #a8edea, #c2e9fb) !important;
    background-size: 300% 100% !important;
    border-radius: 0 6px 6px 0 !important;
    animation: pastelFlow 4s ease-in-out infinite !important;

    /* 스크롤 속도보다 살짝 늦게 따라오는 부드러운 효과 (Thrust Effect) */
    transition: width 0.4s cubic-bezier(0.25, 0.1, 0.25, 1) !important;
}

/* 스크롤 현재 위치(바의 오른쪽 끝)에 빛나는 후광(Comet Head) */
#scroll-progress-bar::after {
    content: '' !important;
    position: absolute !important;
    top: 50% !important;
    right: 0 !important;
    transform: translateY(-50%) !important;
    width: 12px !important;
    height: 12px !important;
    background-color: #ffffff !important;
    border-radius: 50% !important;
    box-shadow: 0 0 15px 5px rgba(255, 255, 255, 0.9),
                0 0 30px 15px rgba(161, 196, 253, 0.8) !important;
    
    transition: all 0.4s cubic-bezier(0.25, 0.1, 0.25, 1) !important;
}

/* 그라데이션 일렁임 애니메이션 */
@keyframes pastelFlow {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* =========================================
   2. 떨어지는 별빛(Stardust) 파티클
   ========================================= */

.stardust {
    position: fixed !important;
    top: 6px !important;
    width: 4px !important;
    height: 4px !important;
    background: #ffffff !important;
    box-shadow: 0 0 8px #ffffff, 0 0 12px #a1c4fd !important;
    border-radius: 50% !important;
    pointer-events: none !important;
    z-index: 999998 !important;
    animation: fallStar linear forwards !important;
}

/* 별빛이 아래로 떨어지며 사라지는 애니메이션 */
@keyframes fallStar {
    0% { transform: translate(0, 0) scale(1); opacity: 1; }
    100% { transform: translate(calc(var(--drift) * 1px), 80px) scale(0); opacity: 0; }
}

/* =========================================
   3. 우측 사이드 플로팅 네비게이션 (Expanding Line Style)
   ========================================= */
.side-nav {
    pointer-events: none;
    position: fixed;
    right: 30px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.side-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.nav-item {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    margin-bottom: 20px;
    cursor: pointer;
    group;
}

/* 메뉴 이름 라벨 (평소) */
.nav-label {
    font-size: 0.85rem; /* 글씨 크기 살짝 키움 */
    color: #cbd5e1; /* 눈에 잘 띄는 밝은 회색으로 변경 */
    margin-right: 15px;
    opacity: 0;
    transform: translateX(10px);
    transition: all 0.3s ease;
    white-space: nowrap;
    font-weight: 500;
}

/* 마우스 올렸을 때 라벨 표시 */
.nav-item:hover .nav-label {
    opacity: 1;
    transform: translateX(0);
}

/* 네비게이션 선(Line) - 평소 모양 */
.nav-dot {
    width: 15px;
    height: 3px; /* 선 두께를 2px에서 3px로 도톰하게 변경 */
    background-color: rgba(255, 255, 255, 0.4); /* 기존 파란색 대신 흰색 반투명으로 변경 */
    transition: all 0.4s cubic-bezier(0.25, 0.1, 0.25, 1);
    margin-left: 10px;
    border-radius: 2px;
}

/* 네비게이션 선(Line) - 마우스 호버 시 모양 */
.nav-item:hover .nav-dot {
    width: 25px;
    background-color: rgba(255, 255, 255, 0.9);
}

/* 🌟 활성화된 섹션 모양 (커피챗 버튼과 동일한 쨍한 오렌지색으로 강렬하게 표시) */
.nav-item.active .nav-dot {
    width: 45px;
    background-color: #f97316; /* 오렌지색 포인트 */
    box-shadow: 0 0 12px rgba(249, 115, 22, 0.8), 0 0 4px #ffffff;
}

/* 🌟 활성화된 섹션의 라벨 모양 */
.nav-item.active .nav-label {
    opacity: 1;
    transform: translateX(0);
    color: #f97316; /* 라벨도 오렌지색으로 변경하여 직관성 증가 */
    font-weight: 700;
}

/* 모바일 화면에서는 사이드바 숨김 */
@media (max-width: 768px) {
    .side-nav {
        display: none;
    }
}

/* =========================================
   사이드 네비게이션 다이나믹 컬러 전환 (밝은 배경 vs 어두운 배경)
   ========================================= */

/* 1. 기본 상태 (밝은/하얀 배경일 때): 검은색 테마 */
.side-nav .nav-label {
    color: #111827 !important; /* 글씨 검은색 */
    transition: color 0.3s ease;
}
.side-nav .nav-dot {
    border-color: #111827 !important; /* 점 테두리 검은색 */
    transition: all 0.3s ease;
}
.side-nav .nav-item.active .nav-dot {
    background-color: #111827 !important; /* 활성화된 점 채우기 */
}

/* 2. 어두운 배경일 때 (JS로 nav-yellow-mode 클래스가 붙음): 노란색 테마 */
.side-nav.nav-yellow-mode .nav-label {
    color: #fbbf24 !important; /* 예쁜 노란색 */
}
.side-nav.nav-yellow-mode .nav-dot {
    border-color: #fbbf24 !important;
}
.side-nav.nav-yellow-mode .nav-item.active .nav-dot {
    background-color: #fbbf24 !important;
    box-shadow: 0 0 10px rgba(251, 191, 36, 0.5) !important; /* 노란색 빛 번짐 효과 */
}