/* photo-scaler.html 私有样式 */
.container {
    max-width: 1400px;
}

.main {
    grid-template-columns: 400px 1fr;
    gap: 15px;
}

.panel {
    display: flex;
    flex-direction: column;
}

/* 上传区域 */
.upload-area {
    border: 2px dashed #d1d5db;
    border-radius: 8px;
    padding: 40px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #f9fafb;
}

.upload-area:hover {
    border-color: #667eea;
    background: #f0f4ff;
}

.upload-area.dragover {
    border-color: #667eea;
    background: #eef2ff;
}

.upload-icon {
    font-size: 48px;
    margin-bottom: 12px;
}

.upload-text {
    color: #6b7280;
    font-size: 14px;
}

.upload-text strong {
    color: #667eea;
}

/* 全局设置 */
.size-inputs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.size-inputs .form-group {
    margin-bottom: 0;
}

/* 预设尺寸 */
.preset-sizes {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
}

.preset-btn {
    padding: 6px 12px;
    font-size: 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    background: white;
    cursor: pointer;
    transition: all 0.2s;
}

.preset-btn:hover {
    border-color: #667eea;
    color: #667eea;
}

/* 按钮行 */
.button-row {
    display: flex;
    gap: 12px;
    margin-top: 16px;
}

/* 图片列表 */
#imageList {
    max-height: 500px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #667eea #f1f1f1;
}

.image-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    margin-bottom: 8px;
    background: #f9fafb;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
    transition: all 0.2s;
}

.image-item:hover {
    border-color: #667eea;
    background: #f0f4ff;
}

.image-preview-small {
    width: 80px;
    height: 80px;
    flex-shrink: 0;
    border-radius: 6px;
    overflow: hidden;
    background: #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: center;
}

.image-preview-small img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.image-preview-small .loading {
    color: #9ca3af;
    font-size: 12px;
}

.image-details {
    flex: 1;
    min-width: 0;
}

.image-name {
    font-weight: 600;
    color: #374151;
    font-size: 14px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 4px;
}

.image-original-size {
    font-size: 12px;
    color: #6b7280;
    margin-bottom: 4px;
}

.image-target-size {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    color: #374151;
}

.input-small {
    width: 70px;
    padding: 4px 6px;
    font-size: 12px;
    text-align: center;
}

.image-scaled-size {
    font-size: 12px;
    color: #16a34a;
    margin-top: 4px;
}

.image-actions {
    display: flex;
    gap: 4px;
    flex-shrink: 0;
}

.btn-small {
    padding: 4px 8px;
    font-size: 11px;
    border-radius: 4px;
}

.btn-danger {
    background: #dc2626;
    color: white;
    border: none;
}

.btn-danger:hover {
    background: #b91c1c;
}

.btn-success:disabled {
    background: #d1d5db;
    color: #9ca3af;
    cursor: not-allowed;
}

/* 图片计数 */
.panel-actions span {
    font-size: 12px;
    color: #6b7280;
}

/* 说明区块 */
.info-section {
    max-width: 1360px;
    margin: 20px auto;
    padding: 24px;
    background: #f9fafb;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
}

.info-section h3 {
    margin: 0 0 16px;
    color: #374151;
    font-size: 18px;
}

.info-section p {
    color: #4b5563;
    line-height: 1.6;
    margin: 0 0 12px;
}

.info-content {
    display: grid;
    gap: 12px;
    margin-top: 16px;
}

.info-item {
    padding: 12px 16px;
    background: white;
    border-radius: 6px;
    border-left: 4px solid #667eea;
    color: #4b5563;
    line-height: 1.6;
}

.info-item strong {
    color: #374151;
}

@media (max-width: 900px) {
    .main {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 600px) {
    .size-inputs {
        grid-template-columns: 1fr;
    }
    
    .button-row {
        flex-direction: column;
    }
    
    .image-item {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .image-preview-small {
        width: 100%;
        height: 120px;
    }
    
    .image-actions {
        width: 100%;
        justify-content: flex-end;
    }
    
    .info-section {
        padding: 16px;
    }
}
