/* 우주 배경 공통 스타일 - 모든 페이지에 적용 */

/* 기본 body 배경 그라디언트 */
body {
    margin: 0;
    padding: 0;
    min-height: 100vh;
    background: linear-gradient(135deg, #FFF5F7 0%, #FFE4E9 50%, #FFD4DD 100%);
    background-attachment: fixed;
    overflow-x: hidden;
}

/* 우주 배경 컨테이너 */
#space-background-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -10;
    overflow: hidden;
    pointer-events: none;
}

/* 별 스타일 (box-shadow를 이용한 다중 별 생성) */
.stars-sm, .stars-md, .stars-lg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: transparent;
    border-radius: 50%;
    will-change: transform, opacity;
}

.stars-sm {
    width: 1px;
    height: 1px;
    box-shadow: 12vw 15vh #fff, 35vw 42vh #fff, 55vw 12vh #fff, 78vw 85vh #fff, 92vw 32vh #fff, 
                15vw 65vh #fff, 45vw 88vh #fff, 68vw 5vh #fff, 82vw 55vh #fff, 22vw 95vh #fff, 
                7vw 25vh #fff, 52vw 72vh #fff, 88vw 18vh #fff, 38vw 38vh #fff, 95vw 92vh #fff, 
                4vw 58vh #fff, 62vw 45vh #fff, 28vw 7vh #fff, 75vw 68vh #fff, 18vw 48vh #fff;
    animation: twinkle-move 120s linear infinite;
    opacity: 0.6;
}

.stars-md {
    width: 2px;
    height: 2px;
    box-shadow: 5vw 82vh #ddd, 28vw 15vh #ddd, 65vw 35vh #ddd, 92vw 62vh #ddd, 42vw 55vh #ddd, 
                15vw 25vh #ddd, 85vw 8vh #ddd, 58vw 95vh #ddd, 75vw 42vh #ddd, 32vw 68vh #ddd, 
                8vw 48vh #ddd, 95vw 28vh #ddd, 22vw 88vh #ddd, 52vw 18vh #ddd, 78vw 75vh #ddd;
    animation: twinkle-move 180s linear infinite reverse;
    opacity: 0.5;
}

.stars-lg {
    width: 3px;
    height: 3px;
    box-shadow: 85vw 25vh #ccc, 15vw 65vh #ccc, 55vw 85vh #ccc, 35vw 12vh #ccc, 72vw 48vh #ccc, 
                92vw 8vh #ccc, 45vw 38vh #ccc, 25vw 92vh #ccc, 62vw 72vh #ccc, 5vw 55vh #ccc;
    animation: twinkle-move 240s linear infinite;
    opacity: 0.4;
    filter: blur(1px);
}

/* 행성 스타일 */
.planet {
    position: absolute;
    border-radius: 50%;
    will-change: transform;
    opacity: 0.7;
}

.planet-purple {
    top: 15%;
    right: -80px;
    width: 250px;
    height: 250px;
    background: radial-gradient(circle at 30% 30%, #FF9BB0, #FF7A99 60%, #FFB7C5);
    box-shadow: inset -10px -10px 40px rgba(255,192,203,0.3), 0 0 40px rgba(124, 77, 255, 0.3);
    animation: float 60s ease-in-out infinite alternate;
}

.planet-red-ring {
    bottom: 25%;
    left: -60px;
    width: 180px;
    height: 180px;
    background: radial-gradient(circle at 70% 70%, #ff9a85, #ff7043 60%, #ffccbb);
    box-shadow: inset 5px 5px 30px rgba(255,180,150,0.5), 0 0 30px rgba(255, 112, 67, 0.3);
    animation: float 50s ease-in-out infinite alternate-reverse;
}

.planet-red-ring::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 240%;
    height: 60%;
    border-radius: 50%;
    border: 8px solid rgba(255, 204, 188, 0.2);
    border-top-color: rgba(255, 204, 188, 0.5);
    border-bottom-color: transparent;
    transform: translate(-50%, -50%) rotate(-20deg);
}

/* 애니메이션 정의 */
@keyframes twinkle-move {
    from {
        transform: translateY(0) rotate(0deg);
    }
    to {
        transform: translateY(-100px) rotate(1deg);
    }
}

@keyframes float {
    0% {
        transform: translate(0, 0) rotate(0deg);
    }
    50% {
        transform: translate(20px, -30px) rotate(2deg);
    }
    100% {
        transform: translate(0, 0) rotate(0deg);
    }
}

/* 모바일 최적화 */
@media (max-width: 768px) {
    .planet-purple {
        width: 150px;
        height: 150px;
        right: -60px;
    }
    
    .planet-red-ring {
        width: 120px;
        height: 120px;
        left: -40px;
    }
}
