/* 拖放区域样式 */
.border-dashed {
    border-style: dashed !important;
    border-color: #dee2e6;
    border-width: 2px !important;
    transition: all 0.3s ease;
}

.border-dashed:hover {
    border-color: var(--bs-primary) !important;
    background-color: rgba(13, 110, 253, 0.05);
}

/* 工具选项样式 */
.enhancement-option, .scale-option {
    border-radius: 20px;
    padding: 0.375rem 0.75rem;
    transition: all 0.2s ease;
}

.enhancement-option.active, .scale-option.active {
    background-color: var(--bs-primary);
    color: white;
    border-color: var(--bs-primary);
}

/* 下载和分享按钮样式 */
#downloadBtn, #shareBtn {
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0,0,0,0.08);
}

#downloadBtn:hover {
    background-color: var(--bs-primary);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(13, 110, 253, 0.25);
}

#shareBtn:hover {
    background-color: var(--bs-success);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(25, 135, 84, 0.25);
}

/* 上传加载覆盖层 */
.upload-loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 8px;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10;
    backdrop-filter: blur(3px); /* 添加模糊效果 */
}

.loading-content {
    text-align: center;
    padding: 2rem;
    max-width: 80%;
    animation: fadeIn 0.3s ease forwards;
}

/* 圆形进度条样式 */
.progress-circle {
    position: relative;
    width: 100px;
    height: 100px;
    margin: 0 auto;
}

.progress-circle svg {
    transform: rotate(-90deg);
    overflow: visible;
}

.progress-circle-path {
    transition: stroke-dashoffset 0.5s ease;
}

.progress-circle-inner {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.progress-circle-inner span {
    font-size: 18px;
    font-weight: bold;
    color: #0d6efd;
    transition: color 0.5s ease;
}

/* 处理完成时的动画 */
@keyframes completeScale {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
    }
}

.process-complete .progress-circle {
    animation: completeScale 1s ease forwards;
}

.process-complete .progress-circle-inner span {
    color: #20c997;
}

/* 处理进度覆盖层 */
.processing-overlay {
    position: absolute;
    top: 20%;
    left: 30%;
    width: 20%;
    min-width: 280px;
    transform: translate(-50%, -50%);
    background: rgba(255, 255, 255, 0.65);
    border-radius: 16px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.15);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10;
    backdrop-filter: blur(5px);
    animation: fadeIn 0.3s ease forwards;
    padding: 20px;
}

.loading-content {
    text-align: center;
    width: 100%;
    animation: fadeIn 0.3s ease forwards;
}

/* 淡入动画 */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 推荐工具列表样式 */
.list-group-item-action {
    border: none;
    transition: all 0.2s ease;
    padding: 0.75rem 0;
}

.list-group-item-action:hover {
    transform: translateX(5px);
    background-color: transparent;
}

/* 小图标样式 */
.feature-icon-gradient {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    margin: 0 auto;
}

.feature-icon-gradient i {
    font-size: 30px;
    color: #ffffff;
    text-shadow: 0 0 10px rgba(255,255,255,0.6);
    position: relative;
    z-index: 2;
}

.feature-icon-gradient::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-size: 200% 200%;
    animation: gradient-shift-icon 5s ease infinite;
}

/* 确保上传容器是相对定位的，以便绝对定位的加载层可以正确覆盖 */
.upload-container {
    position: relative;
}

/* 添加图标脉动动画 */
@keyframes icon-pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
    }
}

.processing-overlay .feature-icon-gradient i,
.upload-loading-overlay .feature-icon-gradient i {
    animation: icon-pulse 1.5s ease-in-out infinite;
}

/* 推荐工具中的图标样式 */
.list-group-item-action .feature-icon-gradient {
    width: 40px;
    height: 40px;
}

.list-group-item-action .feature-icon-gradient i {
    font-size: 20px;
}

/* 推荐工具网格样式 */
.tool-item {
    padding: 8px;
    border-radius: 8px;
    transition: all 0.25s ease;
    color: var(--bs-dark);
}

.tool-item:hover {
    background-color: rgba(13, 110, 253, 0.08);
    transform: translateY(-2px);
    color: var(--bs-primary);
}

.tool-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1.5px solid #dee2e6;
    transition: all 0.3s ease;
}

.tool-icon i {
    font-size: 20px;
    transition: all 0.3s ease;
}

.tool-item:hover .tool-icon {
    border-color: var(--bs-primary);
    background-color: rgba(13, 110, 253, 0.08);
}

.tool-name {
    font-size: 13px;
    font-weight: 500;
    margin-top: 2px;
    text-align: center;
}

/* 美化的增强按钮样式 */
.btn-enhance {
    background-image: linear-gradient(135deg, #2979FF, #4776E6, #8E54E9);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1.1rem;
    letter-spacing: 0.5px;
    box-shadow: 0 6px 15px rgba(71, 118, 230, 0.3);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn-enhance:before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: 0.5s;
}

.btn-enhance:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(71, 118, 230, 0.45);
    color: white;
}

.btn-enhance:hover:before {
    left: 100%;
}

.btn-enhance:active {
    transform: translateY(1px);
    box-shadow: 0 4px 8px rgba(71, 118, 230, 0.3);
}

.btn-enhance:disabled {
    background-image: linear-gradient(135deg, #a2b3d0, #b3b7d6, #c7bed9);
    box-shadow: 0 4px 8px rgba(71, 118, 230, 0.1);
    color: rgba(255, 255, 255, 0.8);
}

/* 添加选中工具的样式 */
.tool-item.active {
    background-color: rgba(13, 110, 253, 0.1);
    color: var(--bs-primary);
    transform: translateY(-2px);
}

.tool-item.active .tool-icon {
    border-color: var(--bs-primary);
    background-color: rgba(13, 110, 253, 0.15);
}

.tool-item.active .tool-name {
    font-weight: 600;
}

/* 缩略图区域样式 */
.image-thumbnails {
    background-color: #f8f9fa;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

/* 缩略图滚动容器 */
.thumbnails-scroll-container {
    position: relative;
    display: flex;
    align-items: center;
    margin: 0.3rem 0; /* 减小上下边距从0.5rem到0.3rem */
}

.thumbnails-wrapper {
    width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: rgba(0,0,0,0.2) transparent;
    padding: 4px 5px; /* 减小上下内边距从8px到4px */
}

.thumbnails-wrapper::-webkit-scrollbar {
    height: 6px;
}

.thumbnails-wrapper::-webkit-scrollbar-thumb {
    background-color: rgba(0,0,0,0.2);
    border-radius: 3px;
}

.thumbnails-wrapper::-webkit-scrollbar-track {
    background-color: transparent;
}

.thumbnails-container {
    display: inline-flex;
    gap: 10px;
    padding: 0 5px;
    /* 添加以下属性使缩略图在容器中居中 */
    width: 100%;
    justify-content: center; 
}

/* 滚动箭头 */
.scroll-arrow {
    position: absolute;
    width: 32px;
    height: 32px;
    background-color: rgba(255,255,255,0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.15);
    cursor: pointer;
    z-index: 5;
    transition: all 0.2s ease;
    border: 1px solid #e9ecef;
}

.scroll-arrow:hover {
    background-color: var(--bs-primary);
    color: white;
    transform: scale(1.05);
}

.scroll-left {
    left: -5px;
}

.scroll-right {
    right: -5px;
}

/* 缩略图项目样式 */
.thumbnail-item {
    cursor: pointer;
    transition: all 0.25s ease;
    position: relative;
    min-width: 75px;
    max-width: 80px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
    margin: 0 3px;
}

.thumbnail-wrapper {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

.thumbnail-item:hover .thumbnail-wrapper {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.thumbnail-item.active .thumbnail-wrapper {
    box-shadow: 0 0 0 3px var(--bs-primary);
    transform: translateY(-2px);
}

.thumbnail-item img {
    width: 100%;
    height: 70px;
    object-fit: cover;
    object-position: center;
    border-radius: 6px;
    border: none;
    transition: all 0.3s ease;
}

.thumbnail-label {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0,0,0,0.6);
    color: white;
    /* padding: 4px; */
    font-size: 12px;
    text-align: center;
    transition: all 0.3s ease;
}

.thumbnail-item.active .thumbnail-label {
    background: rgba(13,110,253,0.8);
    font-weight: 500;
}

.thumbnail-item.active img {
    filter: brightness(1.05);
}

/* 预览图样式 */
.preview-image-container {
    max-height: 500px;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
}

#previewImage {
    max-height: 500px;
    object-fit: contain;
    margin: 0 auto;
}

/* 预览区域整体布局 */
.image-preview-area {
    display: flex;
    flex-direction: column;
    gap: 0.3rem; /* 进一步减小间距，从0.6rem减少到0.3rem */
}

.preview-image-container {
    max-height: 500px;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #f8f9fa;
    border-radius: 10px;
    padding: 10px;
}

#previewImage {
    max-height: 480px;
    max-width: 100%;
    object-fit: contain;
    margin: 0 auto;
}

@media (max-width: 768px) {
    .preview-image-container {
        max-height: 400px;
    }
    
    #previewImage {
        max-height: 380px;
    }
    
    .thumbnail-item {
        min-width: 60px;
    }
    
    .thumbnail-item img {
        height: 60px;
    }
} 