/* ============================================
   감성적인 밤하늘 디자인 시스템
   ============================================ */

/* 히어로 섹션 - 깊은 밤하늘 */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    background: 
        radial-gradient(ellipse at top, rgba(75, 43, 130, 0.4) 0%, transparent 50%),
        radial-gradient(ellipse at bottom, rgba(45, 27, 78, 0.6) 0%, transparent 50%),
        linear-gradient(180deg, 
            #1a0f2e 0%, 
            #2d1b4e 25%, 
            #3d2557 50%, 
            #4d2b5c 75%, 
            #5d3a6d 100%
        );
    padding-top: 80px;
    overflow: hidden;
}

/* 은하수 효과 */
.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(ellipse at 30% 40%, rgba(139, 92, 246, 0.1) 0%, transparent 40%),
        radial-gradient(ellipse at 70% 60%, rgba(236, 72, 153, 0.08) 0%, transparent 45%);
    pointer-events: none;
    z-index: 1;
    opacity: 0.6;
}

/* 유성 컨테이너 */
.shooting-stars {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    pointer-events: none;
    z-index: 3;
}

/* 유성 - 점선 그리는 효과 */
.shooting-star {
    position: absolute;
    width: 2px;
    height: 2px;
    opacity: 0;
    animation: drawShootingStar 3s linear infinite;
}

/* 유성 핵심 */
.shooting-star::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 3px;
    height: 3px;
    background: radial-gradient(circle, 
        rgba(255, 255, 255, 1) 0%, 
        rgba(255, 240, 250, 0.9) 30%, 
        rgba(232, 139, 185, 0.6) 60%,
        transparent 100%);
    border-radius: 50%;
    box-shadow: 
        0 0 6px 2px rgba(255, 255, 255, 0.8),
        0 0 12px 4px rgba(255, 200, 230, 0.6),
        0 0 18px 6px rgba(232, 139, 185, 0.4);
}

/* 점선 꼬리 그리기 효과 */
.shooting-star::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg,
        transparent 0%,
        rgba(255, 255, 255, 0.1) 10%,
        rgba(255, 200, 230, 0.3) 30%,
        rgba(232, 139, 185, 0.5) 50%,
        rgba(255, 240, 250, 0.7) 70%,
        rgba(255, 255, 255, 0.9) 100%
    );
    transform: translateY(-50%);
    transform-origin: right;
    animation: drawTail 3s linear infinite;
    box-shadow: 0 0 8px rgba(255, 200, 230, 0.6);
    border-radius: 2px;
}

@keyframes drawShootingStar {
    0% {
        transform: translate(0, 0) rotate(-45deg);
        opacity: 0;
    }
    5% {
        opacity: 1;
    }
    100% {
        transform: translate(600px, 600px) rotate(-45deg);
        opacity: 0;
    }
}

@keyframes drawTail {
    0% {
        width: 0;
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    30% {
        width: 150px;
    }
    70% {
        width: 150px;
        opacity: 1;
    }
    100% {
        width: 150px;
        opacity: 0;
    }
}

/* 각 유성 타이밍 */
.shooting-star:nth-child(1) {
    top: 10%;
    left: 15%;
    animation-delay: 0s;
}

.shooting-star:nth-child(2) {
    top: 20%;
    left: 45%;
    animation-delay: 4s;
}

.shooting-star:nth-child(3) {
    top: 8%;
    left: 70%;
    animation-delay: 8s;
}

.shooting-star:nth-child(4) {
    top: 25%;
    left: 25%;
    animation-delay: 12s;
}

.shooting-star:nth-child(5) {
    top: 15%;
    left: 60%;
    animation-delay: 16s;
}

.shooting-star:nth-child(6) {
    top: 18%;
    left: 85%;
    animation-delay: 20s;
}

.shooting-star:nth-child(7) {
    top: 12%;
    left: 35%;
    animation-delay: 24s;
}

.shooting-star:nth-child(8) {
    top: 22%;
    left: 55%;
    animation-delay: 28s;
}

/* 로맨틱한 별 파티클 배경 - 레이어 1 */
.stars-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        /* 반짝이는 큰 별 */
        radial-gradient(circle, rgba(255, 255, 255, 0.95) 0%, rgba(255, 240, 250, 0.5) 50%, transparent 2px),
        radial-gradient(circle, rgba(255, 240, 250, 0.9) 0%, rgba(232, 139, 185, 0.4) 50%, transparent 2.5px),
        radial-gradient(circle, rgba(232, 139, 185, 0.85) 0%, rgba(199, 143, 199, 0.4) 50%, transparent 2px),
        radial-gradient(circle, rgba(255, 255, 255, 0.9) 0%, transparent 2px),
        radial-gradient(circle, rgba(255, 200, 230, 0.85) 0%, transparent 2px),
        radial-gradient(circle, rgba(138, 120, 229, 0.7) 0%, transparent 1.8px),
        
        /* 중간 별 */
        radial-gradient(circle, rgba(255, 255, 255, 0.7) 0%, transparent 1.2px),
        radial-gradient(circle, rgba(232, 139, 185, 0.6) 0%, transparent 1px),
        radial-gradient(circle, rgba(255, 240, 250, 0.75) 0%, transparent 1.3px),
        radial-gradient(circle, rgba(255, 255, 255, 0.8) 0%, transparent 1.4px),
        radial-gradient(circle, rgba(199, 143, 199, 0.65) 0%, transparent 1px),
        radial-gradient(circle, rgba(255, 200, 230, 0.7) 0%, transparent 1.2px),
        
        /* 작은 별 */
        radial-gradient(circle, rgba(255, 255, 255, 0.5) 0%, transparent 0.7px),
        radial-gradient(circle, rgba(232, 139, 185, 0.45) 0%, transparent 0.6px),
        radial-gradient(circle, rgba(255, 240, 250, 0.55) 0%, transparent 0.8px),
        radial-gradient(circle, rgba(255, 255, 255, 0.6) 0%, transparent 0.9px),
        radial-gradient(circle, rgba(138, 120, 229, 0.4) 0%, transparent 0.6px),
        
        /* 미세 별빛 */
        radial-gradient(circle, rgba(255, 255, 255, 0.35) 0%, transparent 0.4px),
        radial-gradient(circle, rgba(232, 139, 185, 0.3) 0%, transparent 0.4px),
        radial-gradient(circle, rgba(255, 240, 250, 0.4) 0%, transparent 0.5px),
        radial-gradient(circle, rgba(255, 200, 230, 0.35) 0%, transparent 0.4px);
    background-position:
        8% 12%, 22% 20%, 38% 8%, 55% 25%, 68% 15%, 82% 18%,
        12% 35%, 28% 45%, 45% 38%, 60% 50%, 75% 42%, 88% 48%,
        5% 65%, 18% 72%, 32% 60%, 48% 75%, 62% 68%,
        10% 85%, 25% 90%, 40% 82%, 55% 88%;
    background-size: 100% 100%;
    background-repeat: no-repeat;
    animation: starsSparkle 8s ease-in-out infinite;
    pointer-events: none;
    z-index: 2;
}

/* 별 레이어 2 - 추가 깊이감 */
.stars-layer-2 {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        radial-gradient(circle, rgba(255, 255, 255, 0.8) 0%, transparent 1.5px),
        radial-gradient(circle, rgba(232, 139, 185, 0.7) 0%, transparent 1.3px),
        radial-gradient(circle, rgba(255, 240, 250, 0.75) 0%, transparent 1.4px),
        radial-gradient(circle, rgba(138, 120, 229, 0.65) 0%, transparent 1.2px),
        radial-gradient(circle, rgba(255, 200, 230, 0.7) 0%, transparent 1.3px),
        radial-gradient(circle, rgba(255, 255, 255, 0.6) 0%, transparent 1px),
        radial-gradient(circle, rgba(199, 143, 199, 0.55) 0%, transparent 0.9px),
        radial-gradient(circle, rgba(255, 240, 250, 0.65) 0%, transparent 1.1px),
        radial-gradient(circle, rgba(232, 139, 185, 0.5) 0%, transparent 0.8px),
        radial-gradient(circle, rgba(255, 255, 255, 0.7) 0%, transparent 1.2px);
    background-position:
        15% 18%, 35% 28%, 52% 15%, 70% 32%, 85% 22%,
        20% 55%, 42% 62%, 58% 58%, 78% 65%;
    background-size: 100% 100%;
    background-repeat: no-repeat;
    animation: starsSparkle 12s ease-in-out infinite 2s;
    pointer-events: none;
    z-index: 3;
}

/* 별 레이어 3 - 큰 반짝이는 별 */
.stars-layer-3 {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        radial-gradient(circle, rgba(255, 255, 255, 1) 0%, rgba(255, 240, 250, 0.6) 40%, transparent 3px),
        radial-gradient(circle, rgba(255, 240, 250, 0.95) 0%, rgba(232, 139, 185, 0.5) 40%, transparent 3.5px),
        radial-gradient(circle, rgba(232, 139, 185, 0.9) 0%, rgba(199, 143, 199, 0.5) 40%, transparent 3px),
        radial-gradient(circle, rgba(255, 255, 255, 0.95) 0%, rgba(255, 200, 230, 0.5) 40%, transparent 2.5px),
        radial-gradient(circle, rgba(138, 120, 229, 0.85) 0%, rgba(184, 168, 245, 0.4) 40%, transparent 2.8px);
    background-position:
        18% 25%, 48% 35%, 72% 28%, 32% 65%, 88% 58%;
    background-size: 100% 100%;
    background-repeat: no-repeat;
    animation: bigStarsTwinkle 6s ease-in-out infinite;
    pointer-events: none;
    z-index: 4;
}

/* 우주 먼지 효과 */
.cosmic-dust {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(ellipse at 20% 30%, rgba(138, 120, 229, 0.15) 0%, transparent 40%),
        radial-gradient(ellipse at 80% 70%, rgba(232, 139, 185, 0.12) 0%, transparent 45%),
        radial-gradient(ellipse at 50% 50%, rgba(255, 240, 250, 0.08) 0%, transparent 35%);
    animation: cosmicFloat 20s ease-in-out infinite;
    pointer-events: none;
    z-index: 5;
}

@keyframes bigStarsTwinkle {
    0%, 100% { 
        opacity: 0.7;
        filter: brightness(1) blur(0px);
        transform: scale(1);
    }
    25% { 
        opacity: 1;
        filter: brightness(1.4) blur(0.5px);
        transform: scale(1.1);
    }
    50% { 
        opacity: 0.8;
        filter: brightness(1.1) blur(0px);
        transform: scale(1);
    }
    75% { 
        opacity: 1;
        filter: brightness(1.5) blur(0.5px);
        transform: scale(1.15);
    }
}

@keyframes cosmicFloat {
    0%, 100% {
        opacity: 0.4;
        transform: translate(0, 0) scale(1);
    }
    33% {
        opacity: 0.6;
        transform: translate(20px, -15px) scale(1.05);
    }
    66% {
        opacity: 0.5;
        transform: translate(-15px, 10px) scale(0.98);
    }
}

@keyframes starsSparkle {
    0%, 100% { 
        opacity: 0.6;
        filter: brightness(1);
    }
    25% { 
        opacity: 0.9;
        filter: brightness(1.2);
    }
    50% { 
        opacity: 0.7;
        filter: brightness(1);
    }
    75% { 
        opacity: 1;
        filter: brightness(1.3);
    }
}

/* 달빛 효과 */
.hero-overlay {
    position: absolute;
    inset: 0;
    background: 
        radial-gradient(circle at 85% 15%, rgba(255, 240, 250, 0.08) 0%, transparent 25%),
        radial-gradient(circle at 20% 80%, rgba(232, 139, 185, 0.05) 0%, transparent 30%);
    pointer-events: none;
    z-index: 2;
    animation: moonlight 20s ease-in-out infinite;
}

@keyframes moonlight {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 0.9; }
}

/* 감성적인 빛나는 텍스트 */
.shining-logo-text {
    font-size: 4.5rem;
    font-weight: 400;
    font-family: 'Great Vibes', 'Dancing Script', cursive;
    text-align: left;
    margin-bottom: 2rem;
    background: linear-gradient(
        120deg,
        #ffffff 0%,
        #f472b6 20%,
        #8b5cf6 40%,
        #ec4899 60%,
        #a78bfa 80%,
        #ffffff 100%
    );
    background-size: 300% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gentleShine 12s ease-in-out infinite, mysticalFloat 6s ease-in-out infinite;
    filter: drop-shadow(0 0 40px rgba(139, 92, 246, 1))
            drop-shadow(0 0 80px rgba(236, 72, 153, 0.8))
            drop-shadow(0 0 120px rgba(244, 114, 182, 0.5));
    letter-spacing: 0.05em;
    line-height: 1.2;
    position: relative;
}

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

.shining-logo-text::before {
    content: attr(data-text);
    position: absolute;
    left: 0;
    top: 0;
    z-index: -1;
    background: linear-gradient(
        120deg,
        rgba(255, 255, 255, 0.5) 0%,
        rgba(232, 139, 185, 0.5) 50%,
        rgba(255, 255, 255, 0.5) 100%
    );
    background-size: 300% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: blur(15px);
    animation: gentleShine 12s ease-in-out infinite;
}

@keyframes gentleShine {
    0%, 100% {
        background-position: 0% center;
        filter: drop-shadow(0 0 20px rgba(255, 200, 230, 0.5))
                drop-shadow(0 0 40px rgba(232, 139, 185, 0.3));
    }
    50% {
        background-position: 100% center;
        filter: drop-shadow(0 0 30px rgba(255, 200, 230, 0.8))
                drop-shadow(0 0 60px rgba(232, 139, 185, 0.5));
    }
}

/* 히어로 콘텐츠 */
.hero-content {
    position: relative;
    z-index: 4;
}

/* 다른 섹션 밤하늘 효과 */
.about,
.programs,
.teachers,
.gallery,
.registration,
.map-section {
    position: relative;
    overflow: hidden;
}

.about::before,
.programs::before,
.teachers::before,
.gallery::before,
.registration::before,
.map-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        radial-gradient(circle, rgba(138, 120, 229, 0.06) 0%, transparent 1px),
        radial-gradient(circle, rgba(232, 139, 185, 0.05) 0%, transparent 0.8px),
        radial-gradient(circle, rgba(255, 240, 250, 0.07) 0%, transparent 1px),
        radial-gradient(circle, rgba(199, 143, 199, 0.05) 0%, transparent 0.7px),
        radial-gradient(circle, rgba(138, 120, 229, 0.06) 0%, transparent 0.9px);
    background-position:
        15% 20%, 40% 45%, 65% 25%, 80% 65%, 30% 75%;
    background-size: 100% 100%;
    background-repeat: no-repeat;
    animation: gentleSparkle 15s ease-in-out infinite;
    pointer-events: none;
}

@keyframes gentleSparkle {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 0.8; }
}

/* Features 섹션 강화 */
.features::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        radial-gradient(circle, rgba(255, 255, 255, 0.15) 0%, transparent 1.2px),
        radial-gradient(circle, rgba(255, 240, 250, 0.12) 0%, transparent 1px),
        radial-gradient(circle, rgba(232, 139, 185, 0.1) 0%, transparent 0.9px),
        radial-gradient(circle, rgba(255, 255, 255, 0.13) 0%, transparent 1.1px),
        radial-gradient(circle, rgba(199, 143, 199, 0.11) 0%, transparent 1px);
    background-position:
        12% 18%, 35% 40%, 58% 22%, 75% 60%, 88% 35%;
    background-size: 100% 100%;
    background-repeat: no-repeat;
    animation: nightSparkle 12s ease-in-out infinite;
    pointer-events: none;
    z-index: 1;
}

@keyframes nightSparkle {
    0%, 100% { 
        opacity: 0.6;
        transform: scale(1);
    }
    50% { 
        opacity: 0.9;
        transform: scale(1.02);
    }
}

/* 반응형 */
@media (max-width: 1024px) {
    .shining-logo-text {
        font-size: 3.5rem;
    }
}

@media (max-width: 768px) {
    .shining-logo-text {
        font-size: 2.5rem;
        text-align: center;
    }
    
    .shooting-star:nth-child(n+5) {
        display: none;
    }
    
    @keyframes drawShootingStar {
        0% {
            transform: translate(0, 0) rotate(-45deg);
            opacity: 0;
        }
        5% {
            opacity: 1;
        }
        100% {
            transform: translate(400px, 400px) rotate(-45deg);
            opacity: 0;
        }
    }
    
    @keyframes drawTail {
        0% {
            width: 0;
            opacity: 0;
        }
        10% {
            opacity: 1;
        }
        30% {
            width: 100px;
        }
        70% {
            width: 100px;
            opacity: 1;
        }
        100% {
            width: 100px;
            opacity: 0;
        }
    }
}

@media (max-width: 480px) {
    .shining-logo-text {
        font-size: 2rem;
    }
}