/* 全局样式 */
:root {
    --primary-color: #007AFF;
    --background-color: #F5F5F7;
    --text-color: #1D1D1F;
    --border-radius: 12px;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

* {
    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: var(--text-color);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

.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;
    background: linear-gradient(135deg, #1a1a1a 0%, #4a4a4a 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

header p {
    color: #666;
    font-size: 1.1rem;
}

/* 上传区域样式 */
.upload-area {
    background: white;
    border-radius: var(--border-radius);
    padding: 2rem;
    text-align: center;
    margin-bottom: 2rem;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease;
}

.upload-area:hover {
    transform: translateY(-2px);
}

.upload-box {
    border: 2px dashed #ddd;
    border-radius: var(--border-radius);
    padding: 2rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.upload-box:hover {
    border-color: var(--primary-color);
    background-color: rgba(0, 122, 255, 0.05);
}

.upload-icon {
    fill: var(--primary-color);
    margin-bottom: 1rem;
    transition: transform 0.3s ease;
}

.upload-box:hover .upload-icon {
    transform: scale(1.1);
}

.sub-text {
    color: #666;
    font-size: 0.9rem;
    margin-top: 0.5rem;
}

/* 批量处理控制区域 */
.batch-controls {
    background: white;
    border-radius: var(--border-radius);
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow);
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: center;
}

.quality-control {
    flex: 1;
    min-width: 200px;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.primary-btn {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: var(--border-radius);
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 122, 255, 0.2);
}

.primary-btn:hover {
    background: #0056b3;
    transform: translateY(-1px);
    box-shadow: 0 4px 6px rgba(0, 122, 255, 0.3);
}

/* 图片列表样式 */
.images-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.image-item {
    background: white;
    border-radius: var(--border-radius);
    padding: 1rem;
    box-shadow: var(--shadow);
}

.image-item .preview-box {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
}

.image-preview {
    position: relative;
    padding-top: 75%; /* 4:3 比例 */
    background: #f5f5f5;
    border-radius: 8px;
    overflow: hidden;
}

.image-preview img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.image-info {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
    color: #666;
    margin-top: 0.5rem;
}

.image-actions {
    display: flex;
    justify-content: space-between;
    gap: 0.5rem;
    margin-top: 1rem;
}

.image-actions button {
    flex: 1;
    padding: 0.5rem;
    border: none;
    border-radius: var(--border-radius);
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.compress-btn {
    background: var(--primary-color);
    color: white;
}

.download-btn {
    background: #34C759;
    color: white;
}

.remove-btn {
    background: #FF3B30;
    color: white;
}

.image-status {
    text-align: center;
    margin-top: 0.5rem;
    font-size: 0.9rem;
    color: #666;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        padding: 1rem;
    }
    
    header h1 {
        font-size: 2rem;
    }
    
    .batch-controls {
        flex-direction: column;
    }
    
    .quality-control {
        width: 100%;
    }
    
    .primary-btn {
        width: 100%;
    }
    
    .images-list {
        grid-template-columns: 1fr;
    }
} 