/* 图片压缩工具样式 */
.image-section {
    min-height: 100vh;
    padding: 120px 0 80px;
    background: var(--dark-bg);
}

.image-container {
    max-width: 1200px;
    margin: 0 auto;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 3rem;
    box-shadow: 0 20px 40px rgba(0,0,0,.1);
    backdrop-filter: blur(10px);
}

.image-container h2 {
    text-align: center;
    margin-bottom: .5rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-size: 2.5rem;
    font-weight: 700;
}

.image-subtitle {
    text-align: center;
    color: var(--text-gray);
    margin-bottom: 2.5rem;
    font-size: 1.2rem;
}

/* 上传区域 */
.upload-area {
    border: 3px dashed var(--border-color);
    border-radius: 16px;
    padding: 3rem 2rem;
    text-align: center;
    background: linear-gradient(135deg, rgba(0,198,255,.05), rgba(0,198,255,.02));
    transition: all .3s ease;
    margin-bottom: 2rem;
}

.upload-area.dragover {
    border-color: var(--accent-color);
    background: linear-gradient(135deg, rgba(0,198,255,.1), rgba(0,198,255,.05));
    transform: scale(1.02);
}

.upload-content i {
    font-size: 4rem;
    color: var(--accent-color);
    margin-bottom: 1rem;
}

.upload-content h3 {
    color: var(--text-light);
    margin-bottom: .5rem;
    font-size: 1.5rem;
}

.upload-content p {
    color: var(--text-gray);
    margin-bottom: 1.5rem;
}

.upload-btn {
    padding: 1rem 2rem;
    background: var(--gradient-accent);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all .3s ease;
    box-shadow: 0 8px 25px rgba(0,198,255,.3);
}

.upload-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(0,198,255,.4);
}

.supported-formats {
    margin-top: 1rem;
    color: var(--text-gray);
    font-size: .9rem;
}

/* 压缩设置 */
.compression-settings {
    background: linear-gradient(135deg, rgba(0,198,255,.05), rgba(0,198,255,.02));
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
}

.compression-settings h3 {
    margin-bottom: 1.5rem;
    color: var(--text-light);
    font-size: 1.3rem;
    font-weight: 600;
}

.settings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.setting-item {
    display: flex;
    flex-direction: column;
    gap: .8rem;
}

.setting-item label {
    color: var(--text-gray);
    font-weight: 500;
    font-size: 1rem;
}

.slider-container {
    display: flex;
    align-items: center;
    gap: 1rem;
}

#quality-slider {
    flex: 1;
    height: 6px;
    background: var(--border-color);
    border-radius: 3px;
    outline: none;
    -webkit-appearance: none;
}

#quality-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    background: var(--accent-color);
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0,0,0,.2);
}

#quality-value {
    min-width: 50px;
    text-align: center;
    color: var(--accent-color);
    font-weight: 600;
}

.setting-item input[type="number"],
.setting-item select {
    padding: .8rem;
    border: 2px solid var(--border-color);
    background: var(--dark-bg);
    color: var(--text-light);
    border-radius: 8px;
    outline: none;
    transition: all .3s ease;
}

.setting-item input[type="number"]:focus,
.setting-item select:focus {
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(0,198,255,.2);
}

/* 图片预览 */
.image-preview {
    background: var(--dark-bg);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    margin-bottom: 2rem;
    overflow: hidden;
}

.preview-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    background: linear-gradient(135deg, rgba(0,198,255,.1), rgba(0,198,255,.05));
    border-bottom: 1px solid var(--border-color);
}

.preview-header h3 {
    margin: 0;
    color: var(--text-light);
    font-size: 1.3rem;
    font-weight: 600;
}

.preview-actions {
    display: flex;
    gap: 1rem;
}

.action-btn {
    padding: .8rem 1.2rem;
    border: 2px solid var(--accent-color);
    border-radius: 8px;
    background: var(--accent-color);
    color: white;
    cursor: pointer;
    transition: all .3s ease;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: .5rem;
}

.action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,198,255,.3);
}

.action-btn.secondary {
    background: transparent;
    color: var(--accent-color);
}

.action-btn.secondary:hover {
    background: var(--accent-color);
    color: white;
}

/* 预览内容 */
.preview-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    padding: 2rem;
}

.original-section,
.compressed-section{
    text-align: center;
}

.original-section h4,
.compressed-section h4 {
    margin-bottom: 1rem;
    color: var(--text-light);
    font-size: 1.1rem;
    font-weight: 600;
}

.image-container {
    background: var(--dark-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 2rem;
    margin-bottom: 1rem;
    min-height: 200px;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.image-container img {
    max-width: 100%;
    max-height: 300px;
    object-fit: contain;
    border-radius: 4px;
}

.placeholder {
    color: var(--text-gray);
    text-align: center;
}

.placeholder i {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: .5;
}

/* 图片信息 */
.image-info {
    background: rgba(0,0,0,.2);
    border-radius: 8px;
    padding: 1rem;
}

.info-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: .5rem;
}

.info-item:last-child {
    margin-bottom: 0;
}

.info-item .label {
    color: var(--text-gray);
    font-weight: 500;
}

.info-item .value {
    color: var(--text-light);
    font-weight: 600;
}

.compression-actions {
    display: flex;
    justify-content: center;
    gap: 1rem;
    padding: 2rem;
    border-top: 1px solid var(--border-color);
}

.download-btn {
    padding: 1rem 2rem;
    background: var(--success-color);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all .3s ease;
    display: flex;
    align-items: center;
    gap: .5rem;
}

.download-btn:hover {
    background: #28a745;
    transform: translateY(-2px);
}

.compare-btn {
    padding: 1rem 2rem;
    background: var(--accent-color);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all .3s ease;
    display: flex;
    align-items: center;
    gap: .5rem;
}

.compare-btn:hover {
    background: #00a8e8;
    transform: translateY(-2px);
}

/* 批量处理 */
.batch-processing {
    background: linear-gradient(135deg, rgba(0,198,255,.05), rgba(0,198,255,.02));
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
}

.batch-processing h3 {
    margin-bottom: 1.5rem;
    color: var(--text-light);
    font-size: 1.3rem;
    font-weight: 600;
}

.batch-list {
    max-height: 300px;
    overflow-y: auto;
    margin-bottom: 1.5rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--dark-bg);
}

.batch-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.batch-item:last-child {
    border-bottom: none;
}

.batch-item-info {
    flex: 1;
}

.batch-item-name {
    color: var(--text-light);
    font-weight: 500;
    margin-bottom: .2rem;
}

.batch-item-size {
    color: var(--text-gray);
    font-size: .85rem;
}

.batch-item-status {
    padding: .3rem .8rem;
    border-radius: 4px;
    font-size: .8rem;
    font-weight: 500;
}

.batch-item-status.pending {
    background: rgba(255,193,7,.2);
    color: #ffc107;
}

.batch-item-status.processing {
    background: rgba(0,123,255,.2);
    color: #007bff;
}

.batch-item-status.completed {
    background: rgba(40,167,69,.2);
    color: #28a745;
}

.batch-item-status.failed {
    background: rgba(220,53,69,.2);
    color: #dc3545;
}

.batch-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.batch-btn {
    padding: .8rem 1.5rem;
    border: 2px solid var(--accent-color);
    border-radius: 8px;
    background: var(--accent-color);
    color: white;
    cursor: pointer;
    transition: all .3s ease;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: .5rem;
}

.batch-btn:hover {
    transform: translateY(-2px);
}

.batch-btn.secondary {
    background: transparent;
    color: var(--accent-color);
}

.batch-btn.secondary:hover {
    background: var(--accent-color);
    color: white;
}

.batch-btn.danger {
    border-color: #dc3545;
    background: transparent;
    color: #dc3545;
}

.batch-btn.danger:hover {
    background: #dc3545;
    color: white;
}

/* 使用提示 */
.tips-section {
    background: linear-gradient(135deg, rgba(0,198,255,.05), rgba(0,198,255,.02));
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
}

.tips-section h3 {
    margin-bottom: 1.5rem;
    color: var(--text-light);
    font-size: 1.3rem;
    font-weight: 600;
}

.tips-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.tip-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1.5rem;
    background: rgba(0,0,0,.2);
    border-radius: 8px;
}

.tip-item i {
    color: var(--accent-color);
    font-size: 1.5rem;
    margin-top: .2rem;
}

.tip-item h4 {
    color: var(--text-light);
    margin-bottom: .5rem;
    font-size: 1.1rem;
    font-weight: 600;
}

.tip-item p {
    color: var(--text-gray);
    line-height: 1.5;
}

/* 返回链接 */
.back-link {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    margin-top: 2rem;
    color: var(--accent-color);
    text-decoration: none;
    font-weight: 500;
    transition: all .3s ease;
}

.back-link:hover {
    gap: .8rem;
    color: #00a8e8;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .image-container {
        padding: 2rem;
        margin: 0 1rem;
    }
    
    .preview-content {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .settings-grid {
        grid-template-columns: 1fr;
    }
    
    .batch-actions {
        flex-direction: column;
    }
    
    .tips-grid {
        grid-template-columns: 1fr;
    }
}

/* WebKit 内核浏览器 (Chrome, Safari, Edge) */
input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Firefox */
input[type="number"] {
    -moz-appearance: textfield;
}

/* 可选：确保禁用状态下的样式一致性 */
input[type="number"]:disabled {
    -moz-appearance: textfield;
    -webkit-appearance: none;
}