/* styles.css */
:root {
    --primary-color: #28a745; /* Green color for buttons */
    --secondary-color: #218838; /* Darker green for hover */
    --background-color: #f4f4f4;
    --text-color: #333;
    --border-radius: 8px;
    --box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

body {
    font-family: 'Arial', sans-serif;
    background-color: var(--background-color);
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    color: var(--text-color);
}

.container {
    background-color: #fff;
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    max-width: 600px;
    width: 100%;
    text-align: center;
}

header h1 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    color: var(--primary-color);
}

header p {
    font-size: 1rem;
    color: #666;
}

.upload-section {
    margin: 2rem 0;
}

.file-input {
    margin-bottom: 1.5rem;
}

.btn-green {
    display: inline-flex;
    align-items: center;
    padding: 0.75rem 1.5rem;
    background-color: var(--primary-color);
    color: #fff;
    border: none;
    border-radius: var(--border-radius);
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.3s ease;
    text-decoration: none;
    gap: 0.5rem;
}

.btn-green:hover {
    background-color: var(--secondary-color);
}

#imageInput {
    display: none;
}

.compression-controls {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: center;
    margin-bottom: 1.5rem;
}

.compression-controls label {
    font-size: 1rem;
    font-weight: bold;
}

.compression-controls input[type="range"] {
    width: 100%;
    max-width: 300px;
    -webkit-appearance: none;
    appearance: none;
    background: transparent;
    cursor: pointer;
}

.compression-controls input[type="range"]::-webkit-slider-runnable-track {
    height: 8px;
    background: #ddd;
    border-radius: var(--border-radius);
}

.compression-controls input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    background: var(--primary-color);
    border-radius: 50%;
    margin-top: -6px;
    cursor: pointer;
    transition: background 0.3s ease;
}

.compression-controls input[type="range"]::-moz-range-track {
    height: 8px;
    background: #ddd;
    border-radius: var(--border-radius);
}

.compression-controls input[type="range"]::-moz-range-thumb {
    width: 20px;
    height: 20px;
    background: var(--primary-color);
    border-radius: 50%;
    cursor: pointer;
    transition: background 0.3s ease;
}

.compression-controls input[type="range"]:hover::-webkit-slider-thumb {
    background: var(--secondary-color);
}

.compression-controls input[type="range"]:hover::-moz-range-thumb {
    background: var(--secondary-color);
}

.result-section {
    display: none;
    margin-top: 2rem;
}

.result-section h2 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.image-preview {
    margin-bottom: 1.5rem;
}

#compressedImage {
    max-width: 100%;
    height: auto;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
}

/* Responsive Design */
@media (max-width: 600px) {
    .container {
        padding: 1rem;
    }

    header h1 {
        font-size: 1.5rem;
    }

    header p {
        font-size: 0.9rem;
    }

    .btn-green {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }
}