* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f7f9fc;
    color: #333;
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    flex: 1 0 auto;
}

h1 {
    font-size: 2.5rem;
    color: #2c3e50;
    text-align: center;
    margin-bottom: 1rem;
}

h2 {
    font-size: 1.5rem;
    color: #34495e;
    margin-bottom: 1rem;
}

p {
    text-align: center;
    margin-bottom: 2rem;
    color: #7f8c8d;
}

.upload-container {
    margin-bottom: 2rem;
}

.upload-area {
    border: 2px dashed #ccc;
    border-radius: 8px;
    padding: 3rem;
    text-align: center;
    background-color: #f9f9f9;
    transition: all 0.3s ease;
    cursor: pointer;
}

.upload-area:hover, .upload-area.dragover {
    background-color: #eef2f7;
    border-color: #3498db;
}

.upload-icon {
    margin-bottom: 1rem;
}

.upload-text {
    color: #7f8c8d;
    font-size: 1.1rem;
}

.file-label {
    display: inline-block;
    background-color: #3498db;
    color: white;
    padding: 0.5rem 1.5rem;
    border-radius: 4px;
    cursor: pointer;
    margin-top: 0.5rem;
    transition: background-color 0.3s;
}

.file-label:hover {
    background-color: #2980b9;
}

.file-input {
    display: none;
}

.compression-options {
    background-color: white;
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    margin-bottom: 2rem;
}

.option-group {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
}

.option-group label {
    width: 150px;
    color: #34495e;
}

.option-group input, .option-group select {
    flex: 1;
    padding: 0rem;
    border: 1px solid #ddd;
    border-radius: 4px;
}

/* 鏈€澶у搴﹁緭鍏ユ鍜岃緭鍑烘牸寮忎笅鎷夋鐨勭壒瀹氭牱寮  */
#maxWidth, #outputFormat {
    height: 30px;
    background-color: white;
    font-size: 1rem;
    width: 100%;
}

.option-group input[type="range"] {
    margin-right: 1rem;
    width: 100%;
    max-width: 100%;
    min-width: 200px;
}

#qualityValue {
    display: inline-block;
    background-color: white;
    color: black;
    min-width: 50px;
    text-align: center;
    padding: 5px 10px;
    border-radius: 4px;
    font-weight: bold;
}

.preview-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.preview-item {
    background-color: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    position: relative;
}

.preview-image {
    width: 100%;
    height: 200px;
    object-fit: contain;
    background-color: #f7f7f7;
    border-bottom: 1px solid #eee;
}

.preview-info {
    padding: 1rem;
}

.preview-name {
    font-weight: bold;
    margin-bottom: 0.5rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.preview-size {
    color: #7f8c8d;
    margin-bottom: 0.5rem;
}

.preview-actions {
    display: flex;
    justify-content: space-between;
    margin-top: 0.5rem;
}

.preview-actions button {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: background-color 0.3s;
}

.preview-download {
    background-color: #2ecc71;
    color: white;
}

.preview-download:hover {
    background-color: #27ae60;
}

.preview-remove {
    background-color: #e74c3c;
    color: white;
}

.preview-remove:hover {
    background-color: #c0392b;
}

.action-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.primary-btn, .secondary-btn {
    padding: 0.8rem 2rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    transition: background-color 0.3s;
}

.primary-btn {
    background-color: #3498db;
    color: white;
}

.primary-btn:hover {
    background-color: #2980b9;
}

.primary-btn:disabled {
    background-color: #95a5a6;
    cursor: not-allowed;
}

.secondary-btn {
    background-color: #2ecc71;
    color: white;
}

.secondary-btn:hover {
    background-color: #27ae60;
}

.secondary-btn:disabled {
    background-color: #95a5a6;
    cursor: not-allowed;
}

.footer {
    position: relative;
    width: 100%;
    background-color: #2c3e50;
    color: white;
    text-align: center;
    padding: 18px 0;
    font-size: 16px;
    margin-top: auto;
    left: 0;
    box-sizing: border-box;
    flex-shrink: 0;
}

@media (max-width: 768px) {
    .container {
        padding: 1rem;
    }
    
    .upload-area {
        padding: 2rem 1rem;
    }
    
    .option-group {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .option-group label {
        width: 100%;
        margin-bottom: 0.5rem;
    }
    
    .preview-container {
        grid-template-columns: 1fr;
    }
} 