h1 {
    text-align: center;
    color: #6f1c73;
    margin-bottom: 15px;
    font-size: 2.5rem;
    background: linear-gradient(135deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    background-clip: text;
}

.description {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 20px;
  text-align: center;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.upload-area {
    text-align: center;
    margin-bottom: 20px;
    padding: 20px;
    border: 2px dashed #ddd;
    border-radius: 12px;
    background: #f9f9f9;
    transition: all 0.3s ease;
}

.upload-area:hover {
    border-color: #667eea;
    background: #f0f4ff;
}

.upload-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    transition: transform 0.2s, box-shadow 0.2s;
    gap: 8px;
}

.upload-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.file-info {
    margin-top: 15px;
    color: #666;
    font-size: 0.9rem;
}

.preview-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.preview-box {
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    padding: 8px;
    background: #fafafa;
}

.preview-box h3 {
    text-align: center;
    margin-bottom: 15px;
    color: #333;
    font-size: 1.2rem;
}

.preview-area {
    min-height: 420px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 10px;
    position: relative;
}

.preview-area img {
    max-width: 100%;
    max-height: 400px;
    object-fit: contain;
    transition: transform 0.3s ease;
    cursor: pointer;
}

.preview-area img:hover {
    transform: scale(1.02);
}

/* 添加放大镜图标到预览区域 */
.preview-area::after {
    content: '🔍';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 2rem;
    color: rgba(255, 255, 255, 0.8);
    background-color: rgba(0, 0, 0, 0.5);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    z-index: 10;
}

.preview-area:hover::after {
    opacity: 1;
}

/* 图片查看器样式 */
.image-viewer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.viewer-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
}

.close-btn {
    position: absolute;
    top: -40px;
    right: -20px;
    color: white;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    transition: 0.3s;
}

.close-btn:hover {
    color: #bbb;
}

#viewerImage {
    max-width: 100%;
    max-height: 80vh;
    object-fit: contain;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .close-btn {
        top: -30px;
        right: 0;
        font-size: 30px;
    }
}

.image-info {
    text-align: center;
    font-size: 0.9rem;
    color: #666;
}

.settings {
    background: #f9f9f9;
    padding: 25px;
    border-radius: 12px;
    margin-bottom: 30px;
}

.setting-tip {
    color: #666;
    font-size: 0.9rem;
    line-height: 1.5;
}

.compress-btn {
    display: block;
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1.1rem;
    font-weight: 600;
    transition: transform 0.2s, box-shadow 0.2s;
    margin-bottom: 20px;
}

.compress-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.compress-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.download-btn {
    display: block;
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, #2ecc71, #27ae60);
    color: #243b49 !important;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1.1rem;
    font-weight: 600;
    transition: transform 0.2s, box-shadow 0.2s;
    text-align: center;
    text-decoration: none;
}

.download-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(46, 204, 113, 0.3);
}

.download-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    pointer-events: none;
    transform: none;
    box-shadow: none;
}

/* 文件列表样式 */
.file-list {
    margin-top: 15px;
}

.file-list h4 {
    margin-bottom: 10px;
    color: #333;
    font-size: 1rem;
}

#selectedFiles {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 10px;
}

#selectedFiles li {
    padding: 10px;
    background: #f0f0f0;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    text-align: center;
}

#selectedFiles li:hover {
    background: #e0e0e0;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

#selectedFiles li.active {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    font-weight: 500;
    box-shadow: 0 2px 12px rgba(102, 126, 234, 0.4);
}

@media (max-width: 768px) {
    .preview-container {
        grid-template-columns: 1fr;
    }

    h1 {
        font-size: 2rem;
    }

    #selectedFiles {
        grid-template-columns: 1fr;
    }
}