/* Container to center the sun */
.sun-container {
    position: relative;
    width: 100%;
    height: 100%;
    min-height: 400px;
    display: flex;
    justify-content: center;
    align-items: center;
    /* Removed overflow: hidden and background to let stars extend and blend */
}

/* Stars Background */
.stars, .stars2, .stars3 {
    position: absolute;
    top: 0;
    left: 0;
    width: 200%; /* Covers wider area */
    height: 200%;
    background-repeat: repeat;
    animation: moveStars linear infinite;
    z-index: 0;
    pointer-events: none; /* Let clicks pass through */
}

.stars {
    background-image:
        radial-gradient(1px 1px at 20% 30%, white, transparent),
        radial-gradient(1px 1px at 40% 70%, white, transparent),
        radial-gradient(1px 1px at 80% 10%, white, transparent);
    background-size: 300px 300px;
    animation-duration: 200s;
    opacity: 0.8;
}

.stars2 {
    background-image:
        radial-gradient(2px 2px at 50% 50%, white, transparent),
        radial-gradient(2px 2px at 30% 80%, white, transparent);
        background-size: 500px 500px;
        animation-duration: 350s;
        opacity: 0.6;
}

.stars3 {
    background-image:
        radial-gradient(3px 3px at 25% 40%, #fff, transparent);
        background-size: 800px 800px;
        animation-duration: 500s;
        opacity: 0.4;
}

@keyframes moveStars {
    from { transform: translateY(0); }
    to { transform: translateY(-1000px); }
}

/* -------- SUN -------- */

.sun-wrapper {
    position: relative;
    z-index: 1; /* Above stars */
    /* No absolute positioning needed as flexbox handles centering */
}

.sun {
    position: relative;
    width: 320px;
    height: 320px;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 35%,
        #fff700 0%,
        #ffb300 40%,
        #ff6a00 70%,
        #cc3300 100%);
    box-shadow:
        0 0 80px #ffae00,
        0 0 160px #ff6a00,
        0 0 260px rgba(255,100,0,0.5);
    overflow: visible;
}

.sun::before {
    content: "";
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: repeating-radial-gradient(
        circle,
        rgba(255,255,255,0.08) 0px,
        rgba(255,200,0,0.08) 5px,
        rgba(255,120,0,0.08) 10px
    );
    mix-blend-mode: overlay;
    animation: surfaceMove 10s linear infinite;
}

@keyframes surfaceMove {
    from { transform: rotate(0deg) scale(1); }
    to { transform: rotate(360deg) scale(1.05); }
}

/* -------- ERUPTION -------- */

.eruption {
    position: absolute;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: radial-gradient(circle,
        rgba(255,255,200,1) 0%,
        rgba(255,150,0,0.9) 40%,
        rgba(255,60,0,0.6) 70%,
        transparent 100%);
    pointer-events: none;
    animation: explode 2s ease-out forwards;
    filter: blur(2px);
    z-index: 2; /* Above sun or merged with it */
}

@keyframes explode {
    0% {
        transform: scale(0.5);
        opacity: 1;
    }
    100% {
        transform: scale(6);
        opacity: 0;
    }
}