/* 去除照片背景工具样式 */

/* 文件上传样式 */
.file-upload-container {
    margin: 10px 0;
}

.file-upload-area {
    border: 2px dashed #007bff;
    border-radius: 8px;
    padding: 30px 15px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

.file-upload-area:hover {
    border-color: #0056b3;
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    transform: translateY(-2px);
    box-shadow: 0 3px 10px rgba(0, 123, 255, 0.2);
}

.upload-icon {
    font-size: 40px;
    margin-bottom: 10px;
}

.upload-text p {
    margin: 5px 0;
    color: #495057;
    font-size: 15px;
}

.upload-hint {
    font-size: 13px !important;
    color: #6c757d !important;
}

.file-input {
    display: none;
}

.selected-file {
    display: none;
    align-items: center;
    padding: 12px 15px;
    background: #e8f5e9;
    border-radius: 6px;
    border: 2px solid #4caf50;
}

.file-icon {
    font-size: 22px;
    margin-right: 10px;
}

.file-name {
    flex: 1;
    font-weight: 500;
    color: #2d5a27;
}

.file-size {
    color: #558b2f;
    margin-left: 8px;
}

.remove-file {
    background: #f44336;
    color: white;
    border: none;
    border-radius: 50%;
    width: 26px;
    height: 26px;
    cursor: pointer;
    margin-left: 12px;
    font-size: 16px;
    transition: all 0.3s;
}

.remove-file:hover {
    background: #d32f2f;
    transform: rotate(90deg);
}

/* 进度条样式 */
.processing-progress {
    margin: 20px 0;
    padding: 20px;
    background: linear-gradient(135deg, #fff3e0 0%, #ffe0b2 100%);
    border-radius: 10px;
    border-left: 4px solid #ff9800;
}

.progress-bar {
    width: 100%;
    height: 25px;
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    margin: 12px 0;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.1);
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #4caf50 0%, #8bc34a 100%);
    border-radius: 12px;
    transition: width 0.3s ease;
    width: 0%;
}

.progress-text {
    text-align: center;
    color: #e65100;
    font-weight: 500;
    margin: 8px 0;
    font-size: 14px;
}

/* 预览区域样式 */
.preview-section {
    margin: 20px 0;
    padding: 20px;
    background: linear-gradient(135deg, #f5f5f5 0%, #e0e0e0 100%);
    border-radius: 10px;
}

.image-preview-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-top: 15px;
}

.image-preview {
    background: white;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.image-preview h4 {
    margin: 0 0 12px 0;
    color: #333;
    font-size: 15px;
    border-bottom: 2px solid #007bff;
    padding-bottom: 6px;
}

.image-preview img, .image-preview canvas {
    max-width: 100%;
    max-height: 350px;
    border-radius: 6px;
    display: block;
    margin: 0 auto;
}

.image-info {
    margin-top: 10px;
    text-align: center;
    color: #666;
    font-size: 13px;
}

/* 背景切换按钮 */
.background-toggle {
    display: flex;
    gap: 6px;
    margin-bottom: 12px;
    justify-content: center;
}

.bg-btn {
    padding: 6px 14px;
    border: 2px solid #ddd;
    background: white;
    border-radius: 5px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.3s;
}

.bg-btn:hover {
    border-color: #007bff;
    color: #007bff;
}

.bg-btn.active {
    background: #007bff;
    color: white;
    border-color: #007bff;
}

.result-image-wrapper {
    position: relative;
}

.result-background {
    padding: 12px;
    border-radius: 6px;
    min-height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.result-background.transparent {
    background: transparent;
}

.result-background.white {
    background: white;
}

.result-background.black {
    background: #000;
}

.result-background.checkerboard {
    background-image: 
        linear-gradient(45deg, #ccc 25%, transparent 25%),
        linear-gradient(-45deg, #ccc 25%, transparent 25%),
        linear-gradient(45deg, transparent 75%, #ccc 75%),
        linear-gradient(-45deg, transparent 75%, #ccc 75%);
    background-size: 20px 20px;
    background-position: 0 0, 0 10px, 10px -10px, -10px 0px;
}

/* 表单控件样式 */
.select-input {
    width: 100%;
    padding: 8px 12px;
    border: 2px solid #ddd;
    border-radius: 6px;
    background: white;
    font-size: 14px;
    transition: border-color 0.3s;
}

.select-input:focus {
    outline: none;
    border-color: #007bff;
}

.range-input {
    width: 70%;
    margin-right: 12px;
    vertical-align: middle;
}

#thresholdValue {
    display: inline-block;
    min-width: 50px;
    font-weight: 500;
    color: #007bff;
    font-size: 14px;
}

.checkbox-label {
    margin-left: 6px;
    vertical-align: middle;
    cursor: pointer;
    font-size: 14px;
}

/* 结果信息样式 */
.result-info {
    background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%);
    padding: 15px;
    border-radius: 8px;
    margin: 12px 0;
}

.result-info p {
    margin: 8px 0;
    color: #2d5a27;
    font-size: 14px;
}

.result-info span {
    font-weight: 600;
    color: #1b5e20;
}

/* 使用说明样式 */
.usage-guide {
    margin: 20px 0;
    padding: 20px;
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    border-radius: 10px;
}

.usage-guide h3 {
    color: #0d47a1;
    margin-bottom: 15px;
    font-size: 16px;
}

.guide-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 15px;
}

.guide-step {
    display: flex;
    align-items: flex-start;
    background: white;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

.step-number {
    display: inline-block;
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    color: white;
    border-radius: 50%;
    text-align: center;
    line-height: 32px;
    font-weight: bold;
    margin-right: 12px;
    flex-shrink: 0;
    font-size: 14px;
}

.step-content h4 {
    margin: 0 0 6px 0;
    color: #333;
    font-size: 14px;
}

.step-content p {
    margin: 0;
    color: #666;
    font-size: 13px;
    line-height: 1.5;
}

/* 技巧部分样式 */
.tips-section {
    margin: 20px 0;
    padding: 20px;
    background: linear-gradient(135deg, #fff9c4 0%, #fff59d 100%);
    border-radius: 10px;
}

.tips-section h3 {
    color: #f57f17;
    margin-bottom: 15px;
    font-size: 16px;
}

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

.tip-item {
    background: white;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
    text-align: center;
}

.tip-icon {
    font-size: 28px;
    margin-bottom: 10px;
}

.tip-item h4 {
    margin: 0 0 8px 0;
    color: #333;
    font-size: 14px;
}

.tip-item p {
    margin: 0;
    color: #666;
    font-size: 12px;
    line-height: 1.4;
}

/* 功能特性样式 */
.features {
    margin: 20px 0;
    padding: 20px;
    background: linear-gradient(135deg, #e8eaf6 0%, #c5cae9 100%);
    border-radius: 10px;
}

.features h3 {
    color: #283593;
    margin-bottom: 15px;
    font-size: 16px;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.feature-item {
    background: white;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
    text-align: center;
    transition: transform 0.3s, box-shadow 0.3s;
}

.feature-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.feature-icon {
    font-size: 32px;
    margin-bottom: 10px;
}

.feature-item h4 {
    margin: 0 0 8px 0;
    color: #333;
    font-size: 14px;
}

.feature-item p {
    margin: 0;
    color: #666;
    font-size: 13px;
    line-height: 1.5;
}

/* 错误提示样式 */
.error {
    margin: 15px 0;
    padding: 15px;
    background: linear-gradient(135deg, #ffebee 0%, #ffcdd2 100%);
    border-radius: 8px;
    border-left: 4px solid #f44336;
}

.error h3 {
    color: #c62828;
    margin-top: 0;
    font-size: 16px;
}

.error p {
    color: #d32f2f;
    margin: 8px 0;
    font-size: 14px;
}

.error-tips {
    margin-top: 12px;
    padding: 12px;
    background: white;
    border-radius: 6px;
}

.error-tips h4 {
    color: #e65100;
    margin: 0 0 8px 0;
    font-size: 14px;
}

.error-tips ul {
    margin: 0;
    padding-left: 20px;
}

.error-tips li {
    color: #666;
    margin: 6px 0;
    line-height: 1.4;
    font-size: 13px;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .image-preview-container {
        grid-template-columns: 1fr;
    }
    
    .guide-content, .tips-grid, .feature-grid {
        grid-template-columns: 1fr;
    }
    
    .range-input {
        width: 60%;
    }
    
    .background-toggle {
        flex-wrap: wrap;
    }
    
    .upload-icon {
        font-size: 32px;
    }
    
    .file-upload-area {
        padding: 20px 10px;
    }
}
