/* BACKGROUND & GENERAL STYLING */
/* Importing Google Fonts - Nunito for body text (readability) and Raleway for headers (modern aesthetic) */
@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@300;400;700&family=Raleway:wght@300;400;700&display=swap');

/* General Reset & Full-Page Setup */
html,
body {
    height: 100%;
    /* Ensures the page stretches fully even with little content */
    margin: 0;
    padding: 0;
    font-family: "Nunito", sans-serif;
    /* Selected Nunito for a clean, modern, and highly readable typeface */
    text-align: center;
    /* Ensures all text elements are center-aligned by default */
    background: linear-gradient(180deg, #3E1444, #190924);
    /* Creates a deep space-like gradient background */
    color: #ffffff;
    /* Ensures all text is readable against the dark background */
    display: flex;
    flex-direction: column;
    /* Stacks elements vertically */
    min-height: 100vh;
    /* Ensures the background extends to the full viewport height */
    background-attachment: fixed;
    /* Keeps the background from moving when scrolling */
    background-size: cover;
    /* Makes sure the gradient fills the entire page */
    width: 100vw;
    /* Forces the width to always be the full viewport width */
    overflow-x: hidden;
    /* Prevents any accidental horizontal scrolling */
}

/* MAIN CONTAINER */
/* Wrapper for the primary content area */
.container {
    max-width: 1200px;
    /* Prevents the container from becoming too wide on large screens */
    margin: auto;
    /* Centers the container horizontally */
    padding: 50px;
    /* Provides internal spacing */
    border-radius: 20px;
    /* Softens edges for a modern, polished look */
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.25);
    /* Adds depth by creating a subtle shadow effect */
    flex-grow: 1;
    /* Allows the container to expand when necessary */
    background: transparent;
    /* Keeps the container invisible to allow the background gradient to show through */
}

/* HEADER STYLING */
/* Ensures the title is large, bold, and futuristic */
h1 {
    font-size: 42px;
    /* Large enough for prominence without overwhelming */
    font-weight: 700;
    /* Makes the text bold and strong */
    margin-bottom: 25px;
    /* Adds spacing below the header */
    color: #EDEDED;
    /* Light gray for contrast against dark background */
    font-family: "Raleway", sans-serif;
    /* Uses Raleway for a sleek, professional header */
    text-transform: uppercase;
    /* Ensures headers are fully capitalized for emphasis */
    letter-spacing: 1.8px;
    /* Slightly increased spacing for a clean, futuristic effect */
    text-shadow: 0px 2px 8px rgba(255, 255, 255, 0.1);
    /* Adds a subtle glow for visibility */
}

/* NAVIGATION STYLING */
/* Organizes moon phase navigation buttons in a visually balanced way */
.moon-navigation {
    display: flex;
    /* Enables flexible positioning */
    align-items: center;
    /* Centers buttons vertically */
    justify-content: center;
    /* Centers buttons horizontally */
    gap: 25px;
    /* Ensures equal spacing between navigation buttons */
    margin-top: 25px;
    /* Separates navigation from the header */
}

/* BUTTON STYLING */
/* Interactive buttons for navigation - clean, minimal, and futuristic */
button {
    background: transparent;
    /* Keeps the buttons minimalistic */
    border: 2px solid rgba(255, 255, 255, 0.5);
    /* Semi-transparent white border for a subtle effect */
    font-size: 24px;
    /* Large enough for easy readability */
    width: 45px;
    height: 60px;
    border-radius: 100px;
    /* Oval shape for a futuristic look */
    cursor: pointer;
    /* Indicates interactivity */
    transition: 0.3s ease-in-out;
    /* Smooth transition for hover effects */
    color: rgba(255, 255, 255, 0.7);
    /* Lightened text color for a soft glow effect */
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.1);
    /* Subtle glow effect to make buttons stand out */
}

button:hover {
    background: #ffffff;
    /* Turns white on hover for contrast */
    color: #3E1444;
    /* Keeps text theme-consistent */
    transform: scale(1.15);
    /* Slightly enlarges button for better feedback */
    border: none;
    /* Removes border for a smooth hover effect */
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.3);
    /* Enhances glow effect for visibility */
}

/* MOON CONTAINER */
/* Wrapper for moon phase elements */
#moon-container {
    display: flex;
    /* Enables horizontal alignment of moon phases */
    justify-content: center;
    /* Centers the moon phase elements */
    align-items: center;
    /* Aligns moon phases vertically */
    width: 100%;
    /* Ensures it spans the entire width of the page */
    padding: 40px 0;
    /* Adds vertical spacing for balance */
    gap: 30px;
    /* Provides spacing between elements */
    max-width: 90%;
    /* Restricts width to prevent overflow */
    margin: auto;
    /* Centers the container */
}

/* MOON CARD CONTAINER */
/* Organizes moon phase cards neatly */
.moon-card-container {
    display: flex;
    /* Uses flexbox to align elements horizontally */
    justify-content: center;
    /* Centers moon cards */
    align-items: center;
    /* Ensures proper vertical alignment */
    gap: 20px;
    /* Adds spacing between moon cards */
    flex-wrap: wrap;
    /* Allows moon cards to wrap if they exceed the container width */
}

/* MOON CARD STYLING */
/* This section defines the visual style of the moon phase cards. The design aims to make them look ethereal with a soft glow and smooth transitions. */
.moon-card {
    background: linear-gradient(135deg, #3E1444, #0E0314);
    /* Chose this gradient to give a cosmic, night-sky feel */
    padding: 18px;
    /* Adds spacing inside the card to ensure content has room */
    border-radius: 20px;
    /* Rounds the corners for a modern, smooth appearance */
    text-align: center;
    /* Ensures all text and images inside are centered */
    width: 160px;
    /* Keeps a consistent size for all moon cards */
    transition: 0.8s ease-in-out;
    /* Adds a smooth fade and motion effect when needed */
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
    /* Subtle shadow to add depth and make cards appear elevated */
    opacity: 0.9;
    /* Slight transparency to blend with the background */
    backdrop-filter: blur(12px);
    /* Gives a frosted glass effect to enhance the futuristic feel */
    position: relative;
    /* Allows additional elements to be positioned inside the card */
    z-index: 2;
    /* Ensures moon cards appear above background elements */
}

/* ANIMATED EFFECT FOR MOON CARDS */
/* Applies a subtle animation when the card appears */
.moon-card.animated {
    animation: cardSlide 0.8s ease-in-out;
    /* Uses keyframes to create an entrance effect */
}

/* KEYFRAME ANIMATION FOR MOON CARDS */
/* Creates a smooth slide-in effect when the card is rendered */
@keyframes cardSlide {
    from {
        transform: translateY(20px) scale(0.95);
        /* Starts lower and slightly smaller */
        opacity: 0.5;
        /* Initially more transparent */
    }

    to {
        transform: translateY(0) scale(1);
        /* Moves to final position with full scale */
        opacity: 1;
        /* Becomes fully visible */
    }
}

/* SPECIAL SIZING FOR MIDDLE MOON CARD */
/* The center card is emphasized by enlarging it slightly and increasing its glow */
.moon-card:nth-child(3) {
    transform: scale(1.2);
    z-index: 3;
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.3);
    /* Adds extra glow */
}

/* Adjusting the second and fourth moon cards */
/* These should be slightly larger to create a depth effect */
.moon-card:nth-child(2),
.moon-card:nth-child(4) {
    transform: scale(1.05);
}

/* Shrinking the first and fifth moon cards */
/* These cards fade slightly into the background */
.moon-card:nth-child(1),
.moon-card:nth-child(5) {
    transform: scale(0.9);
    opacity: 0.7;
}

/* MOON CARD IMAGE STYLING */
/* Images inside the moon cards are designed to be circular and evenly spaced */
.moon-card img {
    width: 120px;
    /* Ensures images are consistently sized */
    height: 120px;
    border-radius: 50%;
    /* Makes images circular to match the moon theme */
    margin-bottom: 15px;
    /* Adds spacing below the image for separation */
    transition: 0.3s ease;
    /* Smooth transition when hovered */
}

/* ACTIVE MOON CARD */
/* The selected moon card gets a highlight effect */
.moon-card.active {
    background: linear-gradient(135deg, #5A1A5F, #12071A);
    /* Slightly different color gradient for emphasis */
    transform: scale(1.25);
    /* Enlarges the selected card */
    opacity: 1;
    /* Fully visible when active */
    box-shadow: 0 0 30px rgba(255, 255, 255, 0.4);
    /* Adds a glowing effect to indicate selection */
}

/* MOON CARD TEXT STYLING */
.moon-card p {
    font-size: 18px;
    /* Ensures readability */
    margin: 8px 0;
    /* Adds slight spacing around text */
}

/* ZODIAC SELECTOR SECTION */
/* This dropdown allows users to select their zodiac sign */
.zodiac-selector {
    margin-bottom: 20px;
    /* Adds spacing between dropdown and other elements */
}

.zodiac-selector label {
    font-size: 18px;
    font-weight: 600;
    color: #EDEDED;
    /* Light gray for better readability */
    display: block;
    /* Ensures label appears above the dropdown */
    margin-bottom: 8px;
}

.zodiac-selector select {
    background: #3E1444;
    /* Matches theme colors */
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.5);
    font-size: 18px;
    padding: 10px;
    border-radius: 8px;
    /* Softens the edges */
    outline: none;
    /* Removes default focus outline */
    transition: 0.3s;
    /* Smooth hover effect */
}

.zodiac-selector select:hover,
.zodiac-selector select:focus {
    background: #5A1A5F;
    /* Darkens when hovered or focused */
    border-color: #ffffff;
    /* Enhances border contrast */
}

/* ASTROLOGICAL INSIGHT BOX */
/* Displays text about the selected zodiac sign or moon phase */
.insight-box {
    background: rgba(255, 255, 255, 0.1);
    /* Slight transparency for a glowing effect */
    padding: 15px;
    border-radius: 12px;
    /* Softens edges for a smooth look */
    font-size: 18px;
    font-weight: 500;
    color: #ffffff;
    /* Keeps text highly visible */
    text-align: center;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    /* Adds a slight shadow to lift the element */
    margin-top: 20px;
    /* Ensures spacing from elements above */
    transition: 0.3s ease-in-out;
    /* Smooth animation for appearing text */
}

.insight-box p {
    margin: 0;
    /* Removes default paragraph margins for alignment */
}