/* Import Google Font */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;600&display=swap');

/* Basic Reset & Body Styling */
body {
    margin: 0;
    padding: 0;
    font-family: 'Poppins', sans-serif;
    min-height: 100vh; /* Ensure body takes full viewport height */
    display: flex; /* Use flexbox for centering */
    justify-content: center; /* Center horizontally */
    align-items: center; /* Center vertically */
    /* Animated Gradient Background */
    background: linear-gradient(135deg, #a8c0ff, #3f2b96, #a8c0ff, #7f6ed0); /* Added more stops for smoother animation */
    background-size: 300% 300%; /* Make gradient larger */
    animation: gradientBG 20s ease infinite; /* Apply slow animation */
    color: #ffffff; /* Default text color */
    text-align: center; /* Center text within the container */
    overflow-x: hidden; /* Prevent horizontal scroll */
    position: relative; /* Needed for absolute positioning of sparkles relative to body */
}

/* Keyframes for Background Animation */
@keyframes gradientBG {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Container for Content */
.container {
    padding: 20px;
    max-width: 600px; /* Limit width on larger screens */
    width: 90%; /* Responsive width */
}

/* Heading Styling */
.heading {
    font-size: 2.5rem; /* Larger font size */
    font-weight: 600; /* Slightly bolder */
    letter-spacing: 1.5px; /* Increase letter spacing slightly */
    margin-bottom: 2rem; /* Increase space below heading */
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.2); /* Subtle text shadow */
}

/* Animated Icon Styling */
.heading-icon {
    display: inline-block; /* Keep it inline but allow transform */
    margin-left: 8px; /* Space from heading text */
    font-size: 1.8rem; /* Adjust size relative to heading */
    vertical-align: middle; /* Align icon nicely with text */
    animation: pulse 2.5s ease-in-out infinite; /* Subtle pulse animation */
}

/* Keyframes for Icon Animation */
@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.15); } /* Slightly larger pulse */
    100% { transform: scale(1); }
}

/* Button Styling */
.button {
    display: inline-block; /* Allow padding and margin */
    padding: 12px 25px; /* Comfortable padding */
    font-size: 1.1rem;
    font-weight: 600;
    color: #ffffff;
    background: linear-gradient(135deg, #ff7e5f, #feb47b); /* Warm peach/pink gradient */
    border: none;
    border-radius: 25px; /* Rounded corners */
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease; /* Slightly faster transitions for responsiveness */
    margin-bottom: 2.5rem; /* Increase space below button */
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2); /* Subtle shadow */
}

/* Button Hover Effect */
.button:hover {
    transform: scale(1.05); /* Slightly enlarge */
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3); /* Enhance shadow */
}

/* Button Active (Pressed) Effect */
.button:active {
    transform: scale(0.97); /* Slightly shrink */
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2); /* Reduce shadow for pressed look */
}

/* Compliment Display Area */
.compliment-area {
    min-height: 60px; /* Prevent layout jump */
    padding: 20px; /* Increase padding for more breathing room */
    font-size: 1.25rem; /* Slightly larger compliment text */
    font-weight: 400; /* Standard weight for readability */
    line-height: 1.7; /* Slightly more line spacing */
    opacity: 0; /* Start hidden for fade-in */
    transition: opacity 0.5s ease-in-out; /* Fade-in transition */
    color: #f0f0f0; /* Even lighter text for compliment for contrast */
}

/* Class added by JS to trigger fade-in */
.compliment-area.visible {
    opacity: 1;
}

/* Sparkle Effect Styling */
.sparkle {
    position: fixed; /* Position relative to the viewport */
    width: 6px; /* Slightly larger sparkles */
    height: 6px;
    background-color: #fffacd; /* Lighter gold/yellow */
    border-radius: 50%;
    pointer-events: none; /* Don't interfere with clicks */
    opacity: 0; /* Start invisible */
    animation: sparkle-anim 4s ease-out forwards; /* Much longer duration */
    z-index: 10; /* Ensure sparkles are above the main content if needed */
}

@keyframes sparkle-anim {
    0% {
        opacity: 0;
        transform: scale(0.5) translate(var(--start-x, 0px), var(--start-y, 0px)); /* Start position */
    }
    20% {
        opacity: 1; /* Fade in */
        transform: scale(1.2) translate(var(--mid-x, 0px), var(--mid-y, 0px)); /* Grow and move */
    }
    80% {
        opacity: 0.7; /* Start slow fade */
        transform: scale(0.8) translate(var(--end-x, 0px), var(--end-y, 0px)); /* Shrink slightly and drift */
    }
    100% {
        opacity: 0; /* Fade out completely */
        transform: scale(0.3) translate(var(--end-x, 0px), var(--end-y, 0px)); /* Final small scale */
    }
}


/* Responsive Design */
@media (max-width: 768px) {
    .heading {
        font-size: 2rem;
    }

    .button {
        padding: 10px 20px;
        font-size: 1rem;
    }

    .compliment-area {
        font-size: 1.1rem;
        min-height: 50px;
    }
}

@media (max-width: 480px) {
    .heading {
        font-size: 1.8rem;
    }

    .button {
        padding: 8px 18px;
    }

     .compliment-area {
        font-size: 1rem;
        min-height: 40px;
    }
}
