
@keyframes twinkle {
    0%, 100% {
        transform: scale(0.8);
        opacity: 0.5;
    }
    50% {
        transform: scale(1.2);
        opacity: 1;
    }
}

body {
    margin: 0;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    font-family: 'Noto Sans KR', sans-serif;
    color: white;
    overflow: hidden;

    background-color: #000000;
}


.twinkling-stars {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}
.star {
    position: absolute;
    width: 2px;
    height: 2px;
    background: white;
    border-radius: 50%;
    box-shadow: 0 0 5px white, 0 0 10px white;
    animation: twinkle 2s ease-in-out infinite;
}
/* 별마다 다른 위치와 애니메이션 속도, 지연 시간 부여 */
.star:nth-child(1) { top: 20%; left: 15%; animation-duration: 2.5s; animation-delay: 0s; }
.star:nth-child(2) { top: 50%; left: 30%; animation-duration: 3s; animation-delay: 0.5s; }
.star:nth-child(3) { top: 80%; left: 10%; animation-duration: 2s; animation-delay: 1s; }
.star:nth-child(4) { top: 10%; left: 80%; animation-duration: 2.8s; animation-delay: 0.2s; }
.star:nth-child(5) { top: 90%; left: 90%; animation-duration: 2.2s; animation-delay: 1.5s; }
.star:nth-child(6) { top: 40%; left: 60%; animation-duration: 3.5s; animation-delay: 0.8s; }
.star:nth-child(7) { top: 65%; left: 75%; animation-duration: 2.6s; animation-delay: 1.2s; }


/* --- 카드 및 기타 스타일 (이전과 동일) --- */
.fortune-card {
    width: 90%;
    max-width: 450px;
    height: 480px;
    transition: background 0.8s ease, transform 0.5s ease;
    background: rgba(12, 10, 31, 0.4);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    padding: 35px 25px;
    text-align: center;
}
header h1 {
    font-family: 'Playfair Display', serif;
    font-weight: 900;
    font-size: 3rem;
    letter-spacing: 0.3rem;
    margin: 0;
    color: rgba(255, 255, 255, 0.95);
}
.content {
    flex-grow: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    overflow: hidden;
}
#fortuneResult {
    margin: 0;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}
#fortuneResult.revealed { opacity: 1; transform: translateY(0); }
.fortune-text, .fortune-emoji {
    display: block;
    transition: opacity 0.6s ease, transform 0.6s ease, font-size 0.6s ease, font-family 0.5s ease;
}
button {
    font-family: 'Noto Sans KR', sans-serif;
    font-size: 1rem; padding: 12px 28px; border-radius: 50px; cursor: pointer;
    border: 1px solid rgba(255, 255, 255, 0.7);
    background: transparent;
    color: white;
    transition: all 0.3s ease;
}
button:hover {
    background-color: white;
    color: black;
    transform: translateY(-3px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}
@media (min-width: 601px) {
    .fortune-text {
        opacity: 1; font-size: 1.7rem; font-weight: 600; line-height: 1.6;
        text-shadow: 0 0 10px rgba(0,0,0,0.3);
        transform: translate(0, 0) rotate(0deg) scale(1);
    }
    .fortune-emoji {
        position: absolute; opacity: 0; font-size: 0; transform: scale(0);
    }
}
@media (max-width: 600px) {
    .fortune-text {
        position: absolute; opacity: 0; font-size: 0;
        transform: translate(100px, -150px) rotate(360deg) scale(0);
    }
    .fortune-emoji {
        opacity: 1; font-size: 5rem; transform: scale(1);
    }
    .fortune-card { height: 420px; }
    header h1 { font-size: 2.5rem; }
}