.upload-container {
    border-radius: 8px;
}

.upload-area {
    border: 2px dashed #dee2e6;
    border-radius: 4px;
    padding: 2rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.upload-area:hover {
    border-color: #0d6efd;
    background-color: rgba(13, 110, 253, 0.05);
}

.upload-area.dragover {
    border-color: #0d6efd;
    background-color: rgba(13, 110, 253, 0.1);
}

/* 修改预览容器的通用样式 */
.preview-box {
    min-height: 300px;
    padding: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f8f9fa;
    border-radius: 0.25rem;
}

/* 原图预览容器 */
.original-preview-container {
    background-color: white;
}

/* 修改透明背景容器样式，继承通用样式 */
.transparent-bg-container {
    background-image: linear-gradient(45deg, #f0f0f0 25%, transparent 25%),
                      linear-gradient(-45deg, #f0f0f0 25%, transparent 25%),
                      linear-gradient(45deg, transparent 75%, #f0f0f0 75%),
                      linear-gradient(-45deg, transparent 75%, #f0f0f0 75%);
    background-size: 20px 20px;
    background-position: 0 0, 0 10px, 10px -10px, -10px 0px;
    background-color: #ffffff;
}

#previewContainer img {
    max-height: 300px;
    object-fit: contain;
    border-radius: 4px;
}

/* 移除结果预览图片的背景和边框 */
#resultPreview {
    background: none;
    border: none;
    padding: 0;
}

.progress {
    height: 0.6rem;
    border-radius: 0.25rem;
    background-color: #e9ecef;
    overflow: hidden;
}

.progress-bar {
    background-color: #0d6efd;
    transition: width 0.3s ease;
}

#progressText {
    font-size: 0.85rem;
}

#progressText .badge {
    font-weight: normal;
    padding: 0.5em 1em;
}

/* 添加进度条动画效果 */
.progress-bar-animated {
    animation: progress-bar-stripes 1s linear infinite;
}

.progress-bar-striped {
    background-image: linear-gradient(45deg, 
        rgba(255,255,255,.15) 25%, 
        transparent 25%, 
        transparent 50%, 
        rgba(255,255,255,.15) 50%, 
        rgba(255,255,255,.15) 75%, 
        transparent 75%, 
        transparent);
    background-size: 1rem 1rem;
}

/* 进度条显示/隐藏动画 */
.progress-section {
    transition: all 0.3s ease;
    opacity: 1;
}

.progress-section.d-none {
    opacity: 0;
}

.progress-section .card {
    background-color: #f8f9fa;
    border: 1px solid rgba(0,0,0,.125);
    box-shadow: 0 2px 4px rgba(0,0,0,.05);
}

.progress-section .card-subtitle {
    font-size: 0.9rem;
    font-weight: 500;
}

.error-message {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
    padding: 1rem;
    border-radius: 4px;
    z-index: 1000;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    animation: fadeInOut 3s ease-in-out;
}

@keyframes fadeInOut {
    0% { opacity: 0; }
    10% { opacity: 1; }
    90% { opacity: 1; }
    100% { opacity: 0; }
}

.image-navigation {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    height: 100%;
}

.image-navigation button {
    min-width: 80px;
}

#imageCounter {
    font-size: 0.9rem;
    color: #6c757d;
}

/* 示例展示区域样式 */
.features-section {
    padding: 2rem 0;
}

.category-selector .btn-group {
    flex-wrap: wrap;
    gap: 0.5rem;
}

.category-selector .btn {
    border-radius: 20px !important;
    padding: 0.5rem 1.5rem;
    transition: all 0.3s ease;
}

.category-selector .btn.active {
    background-color: #0d6efd;
    color: white;
}

.examples-container {
    margin-top: 2rem;
}

.example-img {
    max-height: 300px;
    object-fit: contain;
    transition: opacity 0.3s ease;
}

.card {
    border: 1px solid rgba(0,0,0,.125);
    box-shadow: 0 2px 4px rgba(0,0,0,.05);
    transition: all 0.3s ease;
}

.card:hover {
    box-shadow: 0 4px 8px rgba(0,0,0,.1);
}

.transparent-bg {
    background-image: linear-gradient(45deg, #f0f0f0 25%, transparent 25%),
                      linear-gradient(-45deg, #f0f0f0 25%, transparent 25%),
                      linear-gradient(45deg, transparent 75%, #f0f0f0 75%),
                      linear-gradient(-45deg, transparent 75%, #f0f0f0 75%);
    background-size: 20px 20px;
    background-position: 0 0, 0 10px, 10px -10px, -10px 0px;
    background-color: #ffffff;
}

/* 标题动画效果 */
.features-section h2,
.features-section .lead {
    transition: opacity 0.3s ease;
}

/* 示例图片动画效果 */
.example-img {
    max-height: 300px;
    object-fit: contain;
    transition: opacity 0.3s ease;
}

/* 背景颜色选择器样式 */
.bg-color-selector {
    width: 100%;
    height: 100%;
}

.preset-colors {
    width: 100%;
    text-align: center;
}

.color-presets {
    display: flex;
    align-items: center;
    max-width: 300px;
    margin: 0 auto;
}

.color-btn {
    width: 35px;
    height: 35px;
    border: 2px solid #dee2e6;
    border-radius: 6px;
    padding: 0;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: transparent;
}

.custom-color-picker {
    width: 100%;
}

.custom-color-picker input[type="color"] {
    width: 45px;
    height: 35px;
    padding: 0;
    border: 2px solid #dee2e6;
    border-radius: 6px;
    cursor: pointer;
}

/* 优化预览容器样式 */
.preview-box {
    transition: background-color 0.3s ease;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .color-presets {
        max-width: 250px;
    }
    
    .color-btn {
        width: 30px;
        height: 30px;
    }
    
    .custom-color-picker input[type="color"] {
        width: 40px;
        height: 30px;
    }
    
    #downloadBtn, #downloadAllBtn {
        width: 100%;
        margin: 0;
        min-width: auto;
    }
    
    .card-footer {
        min-height: 150px;
    }
}

@media (max-width: 576px) {
    .color-presets {
        max-width: 200px;
    }
    
    .bg-color-selector .d-flex {
        gap: 1rem;
    }
    
    .card-footer {
        min-height: 180px;
    }
}

/* 调整卡片页脚样式 */
.card-footer {
    padding: 1rem;
    min-height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 下载按钮样式优化 */
#downloadBtn, #downloadAllBtn {
    min-width: 160px;
    white-space: nowrap;
}

/* 确保预览图片不会超出容器 */
#originalPreview, #resultPreview {
    max-width: 100%;
    max-height: 300px;
    object-fit: contain;
}

/* 数据统计区块样式 */
.stats-section {
    padding: 3rem 0;
}

.section-header {
    max-width: 700px;
    margin: 0 auto;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-subtitle {
    font-size: 1.125rem;
    color: #6b7280;
    margin-bottom: 0;
    line-height: 1.6;
}

.stat-card {
    background-color: #ffffff;
    border-radius: 1.25rem;
    padding: 2rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
}

.stat-content {
    text-align: center;
}

.stat-icon-wrapper {
    display: inline-block;
}

.stat-icon-bg {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    transition: transform 0.3s ease;
}

.stat-card:hover .stat-icon-bg {
    transform: scale(1.1);
}

.stat-icon-bg i {
    font-size: 2rem;
    color: #ffffff;
}

.stat-info {
    margin-top: 1.5rem;
}

.feature-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 0.75rem;
}

.stat-label {
    font-size: 0.975rem;
    color: #6b7280;
    margin: 0;
    line-height: 1.5;
}

.upload-requirements {
    margin-top: 1rem;
    padding: 1rem;
    background-color: rgba(0, 0, 0, 0.02);
    border-radius: 0.5rem;
}

.requirements-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
    text-align: left;
}

.requirement-item {
    display: flex;
    align-items: center;
    color: #6c757d;
}

.requirement-item i {
    margin-right: 0.5rem;
    color: #0d6efd;
}

@media (max-width: 768px) {
    .requirements-grid {
        grid-template-columns: 1fr;
    }
}