/* Reset some default styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}



/**************************************/
/********** ANIMATION STYLES **********/


/* Add this to the existing styles */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}




/*****************************************/
/********** HTML ELEMENT STYLES **********/

/* Apply a gradient background to the entire page */
body {
    font-family: 'Red Hat Display', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(to bottom right, #ffffff, #a9e7ff);
    color: #333;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

/* Heading styles */
h1 {
    font-size: 3.5em;
    font-weight: 600;
    color: #333;
    margin-bottom: 20px;
}

/* Paragraph styles */
p {
    font-size: 1.5em;
    color: #555;
    margin-bottom: 20px;
}

/* Form styling */
form {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}


/* Textarea styling */
textarea {
    width: 100%;
    height: 100px;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin-bottom: 10px;
    font-size: 1em;
    transition: border-color 0.3s ease;
}

textarea:focus {
    border-color: #007bff;
    outline: none; /* Remove default focus outline */
}


/* Button styling */
button {
    background: #007bff;
    color: #fff;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1em;
    transition: background 0.3s ease, transform 0.2s ease;
}

button:hover {
    background: #0056b3;
    transform: scale(1.05); /* Slightly enlarges the button on hover */
}


/* Image styling */
img {
    max-width: 100%;
    border-radius: 8px;
    margin-top: 20px;
    animation: fadeIn 1s ease-out;
}




/*******************************/
/********** ID STYLES **********/

#imageContainer {
    position: relative;
    display: inline-block;
}

#generatedImage {
    height: auto;
    width: 100%;
    border-radius: 8px;
    margin: 0px;
    opacity: 0;
    transition: opacity 1.5s ease-in-out;
    display: block; /* Ensure it takes up space */
}

#generatedImage.show {
    opacity: 1; /* Make it visible */
}


#overlayText {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5); /* Semi-transparent black background */
    color: white;
    padding: 10px; /* Adjust padding as needed */
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    font-size: 1.5em; /* Adjust font size as needed */
    overflow: hidden; /* Ensures text doesn’t overflow outside the container */
    opacity: 0; /* Initially hide the overlay text */
    transition: opacity 1s ease-in-out; /* Smooth fade-in effect */
}

#overlayText.show {
    opacity: 1; /* Show overlay text */
}


#downloadButton {
    opacity: 0; /* Initially hide the overlay text */
}


#prompt {
    padding: 20px 40px;
}


/* Progress Wrapper */
#progressWrapper {
    width: 100%;
    height: 10px;
    background-color: #f3f3f3;
    border-radius: 5px;
    margin-top: 20px;
    display: none; /* Initially hidden */
}

/* Progress Bar */
#progressBar {
    height: 100%;
    background-color: #007bff;
    width: 0%; /* Start with 0% width */
    border-radius: 5px;
    transition: width 0.4s ease; /* Smooth transition */
}




/**********************************/
/********** CLASS STYLES **********/

/* Container to center content and add padding */
.container {
    max-width: 800px;
    width: 100%;
    padding: 20px 40px;
    background: #fff;
    box-shadow: 0 4px 50px -20px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    text-align: center;
    animation: slideIn 0.6s ease-out;
}


.fade-in {
    animation: fadeIn 1s ease-out;
}


/***********************************/
/********** MEDIA QUERIES **********/

/* ADD MEDIA QUERY FOR PHONES */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }

    h1 {
        font-size: 2em;
    }

    textarea {
        height: 80px;
    }

    button {
        padding: 8px 16px;
    }
}