/* 全局变量定义 */
:root {
    --primary-color: #007AFF;
    --background-color: #F5F5F7;
    --border-radius: 12px;
    --box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* 基础样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* 基础页面样式 */
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background-color: var(--background-color);
    color: #333;
    line-height: 1.6;
}

/* 容器样式 */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

/* 头部样式 */
header {
    text-align: center;
    margin-bottom: 2rem;
}

header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

header p {
    color: #666;
}

/* 上传区域样式 */
.upload-container {
    background: white;
    border-radius: var(--border-radius);
    padding: 2rem;
    text-align: center;
    border: 2px dashed #ddd;
    margin-bottom: 2rem;
    transition: all 0.3s ease;
}

.upload-container.drag-over {
    border-color: var(--primary-color);
    background: #f0f8ff;
}

.upload-icon {
    width: 48px;
    height: 48px;
    fill: var(--primary-color);
    margin-bottom: 1rem;
}

.upload-btn {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: 8px;
    font-size: 1rem;
    cursor: pointer;
    margin-top: 1rem;
    transition: all 0.3s ease;
}

.upload-btn:hover {
    background: #0056b3;
}

/* 预览区域样式 */
.preview-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

.preview-box {
    background: white;
    padding: 1rem;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
}

.preview-box h3 {
    margin-bottom: 1rem;
    color: #333;
}

.image-preview {
    width: 100%;
    height: 300px;
    overflow: hidden;
    border-radius: 8px;
    background: #f5f5f5;
    display: flex;
    align-items: center;
    justify-content: center;
}

.image-preview img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.file-info {
    margin-top: 1rem;
    color: #666;
}

/* 控制区域样式 */
.controls {
    background: white;
    padding: 1.5rem;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
}

.quality-control {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

/* 滑块样式 */
input[type="range"] {
    flex: 1;
    height: 6px;
    background: #ddd;
    border-radius: 3px;
    appearance: none;
}

input[type="range"]::-webkit-slider-thumb {
    appearance: none;
    width: 18px;
    height: 18px;
    background: var(--primary-color);
    border-radius: 50%;
    cursor: pointer;
}

/* 下载按钮样式 */
.download-btn {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 8px;
    font-size: 1rem;
    cursor: pointer;
    width: 100%;
    transition: all 0.3s ease;
}

.download-btn:hover {
    background: #0056b3;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .preview-container {
        grid-template-columns: 1fr;
    }
    
    .container {
        padding: 1rem;
    }
    
    header h1 {
        font-size: 2rem;
    }
} 