/* 全局样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* 全局变量 */
:root {
    --primary-color: #007AFF;
    --text-color: #333333;
    --border-color: #E5E5EA;
    --background-color: #F2F2F7;
    --white: #FFFFFF;
    --shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    --radius: 12px;
}

/* 基础样式 */
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: var(--text-color);
    background-color: var(--background-color);
    line-height: 1.5;
}

/* 容器布局 */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* 头部样式 */
.header {
    text-align: center;
    margin-bottom: 2rem;
}

.header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, #007AFF, #5856D6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.subtitle {
    color: #666;
    font-size: 1rem;
}

/* 主要内容区域 */
.main {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2rem;
    align-items: center;
}

/* 上传区域 */
.upload-area {
    width: 100%;
    max-width: 600px;
    height: 300px;
    background: var(--white);
    border: 2px dashed var(--border-color);
    border-radius: var(--radius);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.upload-area:hover {
    border-color: var(--primary-color);
    background-color: rgba(0, 122, 255, 0.05);
}

.upload-icon {
    margin-bottom: 1rem;
}

.upload-icon svg {
    fill: var(--primary-color);
}

.upload-text {
    font-size: 1.25rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.upload-hint {
    color: #666;
    font-size: 0.875rem;
}

/* 预览区域 */
.preview-area {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    padding: 2rem;
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.preview-box {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.preview-box h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-color);
}

.image-container {
    width: 100%;
    height: 300px;
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--background-color);
    display: flex;
    align-items: center;
    justify-content: center;
}

.image-container img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.image-info {
    font-size: 0.875rem;
    color: #666;
}

/* 压缩设置 */
.compress-settings {
    width: 100%;
    padding: 1rem;
    background: var(--background-color);
    border-radius: var(--radius);
}

.quality-control {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.quality-control label {
    font-weight: 500;
}

.quality-control input[type="range"] {
    flex: 1;
    -webkit-appearance: none;
    height: 4px;
    background: var(--border-color);
    border-radius: 2px;
    outline: none;
}

.quality-control input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    background: var(--primary-color);
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s ease;
}

.quality-control input[type="range"]::-webkit-slider-thumb:hover {
    transform: scale(1.1);
}

/* 下载按钮 */
.download-btn {
    padding: 1rem 2rem;
    font-size: 1rem;
    font-weight: 500;
    color: var(--white);
    background: var(--primary-color);
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    transition: all 0.3s ease;
}

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

.download-btn:active {
    transform: translateY(0);
}

/* 页脚 */
.footer {
    text-align: center;
    padding: 2rem 0;
    color: #666;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        padding: 1rem;
    }

    .header h1 {
        font-size: 2rem;
    }

    .upload-area {
        height: 200px;
    }

    .preview-area {
        grid-template-columns: 1fr;
    }

    .image-container {
        height: 200px;
    }
} 