/* Custom Styles */
body {
    font-family: 'Inter', sans-serif;
    /* Animated Gradient Background */
    background: linear-gradient(-45deg, #ee7752, #e73c7e, #23a6d5, #23d5ab);
    background-size: 400% 400%;
    animation: gradientBG 15s ease infinite;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem; /* Add padding for smaller screens */
}

@keyframes gradientBG {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Style for the main content container - subtle animation */
.content-container {
    animation: fadeInScale 0.8s ease-out forwards;
}

@keyframes fadeInScale {
    from { opacity: 0; transform: translateY(30px) scale(0.95); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}


/* Shayari text style - Add padding here for better PDF capture */
.shayari-text {
    font-size: 1.5rem;
    line-height: 2.5rem;
    font-family: 'Noto Sans Devanagari', 'Inter', sans-serif;
    white-space: pre-wrap; /* Preserve line breaks from API */
    text-align: center;
    padding: 1.5rem; /* pd-6 equivalent */
    margin: 0 auto;
    max-width: 100%; /* Ensure it doesn't overflow */
    box-sizing: border-box; /* Include padding in the element's total width/height */
    /* Add a subtle transition for its appearance */
    transition: opacity 0.5s ease-in-out;
}

/* Loader animation */
.loader {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #ff6b6b; /* Changed loader color slightly */
    border-radius: 50%;
    width: 40px; /* Slightly larger loader */
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 20px auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Utility class to center absolutely positioned elements */
.absolute-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

/* Visibility classes with transitions */
/* These classes will be managed by the JavaScript */
.opacity-0 { opacity: 0; }
.opacity-100 { opacity: 1; }
.transition-opacity { transition: opacity 0.5s ease-in-out; } /* Control opacity changes */
.pointer-events-none { pointer-events: none; } /* Disable clicks when hidden */
.pointer-events-auto { pointer-events: auto; } /* Enable clicks when visible */
.hidden { display: none; } /* Hide element completely */


/* Ensure action buttons layout correctly when visible */
#action-buttons.flex {
    display: flex; /* Keep as flex when visible */
}


/* Action button styles with improved shadow/hover */
.action-button {
    transition: all 0.3s ease;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15); /* Slightly larger shadow */
}
.action-button:hover {
    transform: translateY(-3px); /* More pronounced lift */
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2); /* Larger shadow on hover */
}
.action-button:active {
    transform: translateY(0);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1); /* Smaller shadow on click */
}

/* Input focus style with animation */
input:focus {
    outline: none;
    box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.3); /* Slightly wider ring */
    border-color: #4f46e5; /* Indigo-600 */
    transition: all 0.2s ease-in-out; /* Add transition */
}
input {
    transition: all 0.2s ease-in-out; /* Transition for non-focused state too */
}

/* Ad Space Styling (Optional: add margin/padding if needed) */
.ad-space {
    margin: 20px 0; /* Add some vertical space around ads */
}

/* Responsive adjustments */
@media (max-width: 639px) { /* Below sm breakpoint */
    .shayari-text {
        font-size: 1.2rem; /* Slightly smaller text on small screens */
        line-height: 2rem;
        padding: 1rem; /* Less padding on small screens */
    }
    .action-button {
        width: 100%; /* Make buttons full width on small screens */
    }
    #action-buttons.flex {
        flex-direction: column; /* Stack buttons vertically on small screens */
    }
}