/* 1. Font Definition - Ensure the filename matches your Neocities upload exactly */
@font-face {
    font-family: 'Storyboo';
    src: url('Storyboo.TTF') format('truetype'); 
}

* {
    cursor: url('star.png'), auto !important;
}

/* General page settings */
body {
    background-color: #1a1a4b; 
    background-image: url('pbg.jpg'); 
    
    /* Forces the image to fill every corner of the screen (no sidebars) */
    background-size: 100% 100%; 
    
    background-attachment: fixed;
    background-position: center;
    background-repeat: no-repeat;
    
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    margin: 0;
    overflow: hidden; /* Keeps the page clean without scrollbars */
    
    animation: moonlight-breath 8s ease-in-out infinite;
}

.content-area {
    text-align: center;
}

/* 1. Updated Fade-In with "Shadow Lift" transparency */
@keyframes welcomeFade {
    0% {
        opacity: 0;
        filter: blur(10px);
        transform: translateY(10px);
    }
    100% {
        /* 0.8 opacity lets the background "lift" through the text */
        opacity: 0.8; 
        filter: blur(0);
        transform: translateY(0);
    }
}

/* 2. The Soft Pulse Animation */
@keyframes softPulse {
    0%, 100% {
        text-shadow: 0 0 20px rgba(255, 255, 255, 0.4), 2px 2px 5px rgba(0, 0, 0, 0.8);
        transform: scale(1);
    }
    50% {
        /* The glow expands and the text grows very slightly */
        text-shadow: 0 0 35px rgba(255, 255, 255, 0.7), 2px 2px 5px rgba(0, 0, 0, 0.8);
        transform: scale(1.02);
    }
}

h1 {
    font-family: 'Storyboo', serif;
    font-size: 5rem; 
    color: #f0f0f0; 
    margin: 0;
    cursor: pointer;

    /* THE OUTLINE */
    /* 2px makes it thick enough to see clearly; change to 3px for extra chunkiness */
    -webkit-text-stroke: 2px #2a1a4b; 
    
    /* Applying both animations */
    animation: welcomeFade 3s ease-out forwards, 
               softPulse 6s ease-in-out infinite 3s; 
    
    /* Keeping the glow, but tightening it to let the outline shine */
    text-shadow: 0 0 15px rgba(255, 255, 255, 0.3), 
                 2px 2px 5px rgba(0, 0, 0, 0.8);
                 
    opacity: 0;
}

.content-area {
    text-align: center;
    z-index: 5; /* Ensures it stays above the star layers */
}

/* Star Layer Base - Keep them fixed and still */
.star-layer {
    position: fixed;
    top: 0;
    left: 0;
    background: transparent;
    pointer-events: none;
    width: 100vw;
    height: 100vh;
}

/* Group 1: Small stars */
.small {
    width: 1px;
    height: 1px;
    box-shadow: 
        10vw 20vh #fff, 25vw 40vh #fff, 35vw 10vh #fff, 50vw 30vh #fff, 
        65vw 20vh #fff, 80vw 45vh #fff, 90vw 15vh #fff, 15vw 70vh #fff, 
        30vw 85vh #fff, 45vw 60vh #fff;
    animation: flicker-only 3s infinite step-end;
}

/* Group 2: Medium stars */
.medium {
    width: 2px;
    height: 2px;
    box-shadow: 
        12vw 35vh #fff, 28vw 60vh #fff, 42vw 20vh #fff, 58vw 45vh #fff, 
        72vw 15vh #fff, 88vw 50vh #fff, 10vw 80vh #fff, 22vw 90vh #fff;
    animation: flicker-only 5s infinite step-end;
    animation-delay: 1.5s;
}

/* THE FLICKER ANIMATION 
   We only change opacity. By using specific percentages, 
   the star will "blink" or "shimmer" rather than just fade in/out.
*/
@keyframes flicker-only {
    0%, 100% { opacity: 1; }
    30% { opacity: 0.4; }
    35% { opacity: 0.8; }
    45% { opacity: 0.2; }
    50% { opacity: 0.9; }
    80% { opacity: 0.3; }
}

/* The Shooting Star */
.shooting-star {
    position: fixed;
    bottom: -10%; /* Start below the screen */
    right: -10%;  /* Start to the right of the screen */
    width: 150px; /* This creates the long "tail" */
    height: 2px;
    /* Gradient goes from glowing white to transparent */
    background: linear-gradient(to left, rgba(255,255,255,1), rgba(255,255,255,0));
    
    /* Rotate it so it points toward the top-left */
    transform: rotate(35deg); 
    
    opacity: 0;
    pointer-events: none;
    filter: drop-shadow(0 0 8px white);
    
    /* 15-second loop: fast movement, long wait */
    animation: cosmic-shoot 15s linear infinite;
}

@keyframes cosmic-shoot {
    0% {
        transform: rotate(35deg) translateX(0);
        opacity: 0;
    }
    1% {
        opacity: 1; /* Appears suddenly */
    }
    10% {
        /* Moves far across the screen */
        transform: rotate(35deg) translateX(-120vw); 
        opacity: 0;
    }
    100% {
        transform: rotate(35deg) translateX(-120vw);
        opacity: 0;
    }
}

@keyframes moonlight-breath {
    0%, 100% { 
        filter: brightness(100%) saturate(100%); 
    }
    50% { 
        filter: brightness(115%) saturate(110%); /* Subtle glow boost */
    }
}

body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* Creates a dark border that fades toward the center */
    background: radial-gradient(circle, transparent 50%, rgba(0,0,0,0.4) 100%);
    pointer-events: none;
    z-index: 2;
    animation: vignette-pulse 10s infinite;
}

@keyframes vignette-pulse {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 0.8; }
}

.moon-anchor {
    position: fixed !important; /* Fixed stays relative to the screen, not the text */
    top: 20px !important;
    left: 20px !important;
    width: 50px !important; /* Forces it to be small */
    height: auto;
    z-index: 9999 !important; /* Ensures it sits on top of everything */
    cursor: pointer;
    text-align: center;
}

.floating-moon {
    width: 100% !important;
    height: auto;
    display: block;
    filter: drop-shadow(0 0 10px white);
    animation: moonFloat 4s ease-in-out infinite;
}

.enter-hint {
    font-family: 'Storyboo', serif;
    color: white;
    font-size: 10px;
    margin-top: 2px;
    opacity: 0.6;
}

/* The cloud starts off-screen to the right */
#transition-cloud {
    position: fixed;
    top: 0;
    left: 100%; 
    width: 100vw;
    height: 100vh;
    background: radial-gradient(circle, #f0f0f0 0%, #a29bfe 50%, #050510 100%);
    filter: blur(60px);
    z-index: 10000;
    transition: left 1.2s ease-in-out;
}
