/* General Styles */
body {
    font-family: 'Arial', sans-serif;
    background-color: #f3f4f6;
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    overflow: hidden;
    background-image: url('your-background-image.jpg'); /* Replace with your image path */
    background-size: cover; /* Make image cover entire page */
    background-position: center; /* Center the background image */
    background-attachment: fixed; /* Make background fixed while scrolling */
}

/* Container */
.container {
    background-color: rgba(255, 255, 255, 0.9); /* Semi-transparent background */
    border-radius: 15px;
    padding: 30px;
    max-width: 500px;
    width: 100%;
    box-shadow: 0px 8px 15px rgba(0, 0, 0, 0.2);
    text-align: center;
    overflow-y: auto; /* Scroll only if content overflows */
    max-height: 80vh;
    animation: fadeIn 1.5s ease-in-out;
}

/* Fade-in animation */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Description Section */
.description {
    background-color: rgba(255, 255, 255, 0.7); /* Slight transparency */
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 10px;
    font-size: 1rem;
    color: #333;
    box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.2);
}

/* Header */
h1 {
    color: #333;
    font-size: 2rem;
    margin-bottom: 20px;
    animation: bounce 1.5s infinite;
}

/* Bounce animation for header */
@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}

/* File Input */
input[type="file"] {
    margin: 20px 0;
    font-size: 1rem;
    padding: 8px;
    border: 2px solid #ddd;
    border-radius: 5px;
    transition: box-shadow 0.3s ease-in-out;
}

input[type="file"]:hover {
    box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.2);
}

/* Range Slider */
label {
    display: block;
    margin-top: 20px;
    font-size: 1rem;
    color: #555;
}

input[type="range"] {
    width: 100%;
    margin: 10px 0;
}

#qualityValue {
    font-weight: bold;
    color: #007bff;
}

/* Buttons */
button {
    padding: 10px 20px;
    background-color: #007bff;
    color: white;
    border: 2px solid transparent;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1rem;
    transition: background-color 0.3s ease-in-out, transform 0.2s ease-in-out, box-shadow 0.3s ease-in-out;
    animation: borderColor 2s linear infinite;
}

button:hover {
    background-color: #0056b3;
    transform: scale(1.05);
    box-shadow: 0px 8px 15px rgba(0, 123, 255, 0.3);
}

/* Image Preview */
#preview img {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
    margin-top: 20px;
    border: 5px solid transparent;
    animation: borderColor 2s linear infinite;
    box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.1);
}

/* Compressed Result Section */
.compressed {
    margin-top: 20px;
}

.compressed img {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
    border: 5px solid transparent;
    animation: borderColor 2s linear infinite;
    box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.1);
    margin-bottom: 10px;
}

/* Download Button */
.compressed a button {
    background-color: #28a745;
    margin-top: 10px;
}

.compressed a button:hover {
    background-color: #218838;
    box-shadow: 0px 6px 12px rgba(40, 167, 69, 0.3);
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-thumb {
    background-color: #007bff;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background-color: #0056b3;
}
