* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: Arial, sans-serif;
}

body {
    background-color: #f5f5f5;
    padding: 20px;
}

.container {
    max-width: 1000px;
    margin: 0 auto;
    background-color: white;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

h1 {
    text-align: center;
    margin-bottom: 30px;
    color: #333;
}

h2 {
    margin-bottom: 15px;
    color: #444;
}

.upload-container {
    text-align: center;
    margin-bottom: 30px;
}

.btn {
    background-color: #4CAF50;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 5px;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.3s;
    display: inline-block;
    text-decoration: none;
}

.btn:hover {
    background-color: #3e8e41;
}

.hidden {
    display: none;
}

.image-preview-wrapper {
    width: 500px;
    height: 500px;
    margin: 0 auto 20px;
    border: 2px dashed #ddd;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

#imagePreview, #outputImage {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.settings-section {
    margin: 30px 0;
    padding: 20px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background-color: #f9f9f9;
}

.setting-item {
    margin-bottom: 15px;
}

label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

input[type="number"], select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 16px;
}

input[type="range"] {
    width: 100%;
    margin-top: 5px;
}

#compressionValue {
    display: inline-block;
    margin-left: 10px;
}

.process-btn {
    width: 100%;
    margin-top: 15px;
}

.output-section {
    margin-top: 30px;
    text-align: center;
}

.download-btn {
    margin-top: 15px;
    background-color: #2196F3;
}

.download-btn:hover {
    background-color: #0b7dda;
}

.preview-section, .output-section {
    margin-bottom: 30px;
}

.output-info {
    font-size: 14px;
    color: #666;
    margin: 5px 0 15px;
    text-align: center;
}

@media (max-width: 600px) {
    .image-preview-wrapper {
        width: 100%;
        height: auto;
        aspect-ratio: 1;
    }
}
