/* 整体背景 */
body {
    background: var(--gray-50);
}

/* 工具容器 */
.tool-content {
    flex: 1;
    overflow: hidden;
    margin-bottom: 2rem;
}

/* 工具头部 */
.tool-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 0.75rem 0;
    padding: 1rem 1.25rem;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.tool-header h1 {
    font-size: 1.25rem;
    color: var(--gray-900);
}

.tool-actions {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

/* 按钮样式 */
.btn {
    height: 2rem;
    padding: 0 1rem;
    border: none;
    border-radius: 6px;
    background: var(--primary);
    color: white;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.875rem;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 72px;
}

.btn:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.btn:active {
    transform: translateY(0);
    box-shadow: none;
}



.img-dropzone {
    border: 2px dashed #e5e7eb;
    border-radius: 8px;
    padding: 40px;
    text-align: center;
    background: white;
    cursor: pointer;
    margin-bottom: 20px;
}

.img-dropzone:hover,
.img-dropzone.dragover {
    border-color: var(--primary);
    background: rgba(var(--primary-rgb), 0.05);
}

.img-dropzone-content {
    color: #666;
}

.img-dropzone-content svg {
    width: 48px;
    height: 48px;
    margin-bottom: 15px;
    stroke: #666;
}

.img-dropzone-content p {
    margin: 0;
    font-size: 16px;
    color: #666;
}

/* 预览列表 */
.img-preview {
    background: white;
    border-radius: 8px;
    padding: 15px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

/* 压缩列表 */
.compress-list {
    margin-top: 1.5rem;
}

.compress-item {
    background: #f8fafc;
    border-radius: 8px;
    padding: 1rem;
    display: grid;
    grid-template-columns: minmax(200px, 2fr) 100px minmax(150px, 1fr) 100px 100px 80px;
    align-items: center;
    gap: 1rem;
    transition: all 0.3s ease;
}

.compress-item:hover {
    background: #f1f5f9;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

/* 文件信息区域 */
.file-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 0;
}

.file-thumbnail {
    width: 40px;
    height: 40px;
    border-radius: 6px;
    overflow: hidden;
    flex-shrink: 0;
    background: #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #e2e8f0;
}

.file-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 4px;
}

.thumbnail-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #94a3b8;
    background: #f8fafc;
    border-radius: 4px;
}

.file-name {
    font-size: 0.875rem;
    color: #1e293b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
    flex: 1;
}

.file-size {
    font-size: 0.875rem;
    color: #64748b;
    text-align: right;
    white-space: nowrap;
}

.compress-progress {
    width: 100%;
    height: 6px;
    background: #e2e8f0;
    border-radius: 3px;
    overflow: hidden;
}

.progress-bar {
    width: 0;
    height: 100%;
    background: var(--primary);
    border-radius: 3px;
    transition: all 0.3s ease;
}

.compress-result {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    white-space: nowrap;
}

.compress-result span {
    color: #64748b;
}

.compress-ratio {
    color: #10b981 !important;
    font-weight: 500;
    white-space: nowrap;
}

/* 错误状态样式 */
.compress-ratio.error {
    color: #ef4444 !important;
}

.compress-ratio.file-error {
    color: #f59e0b !important;
}

.download-link {
    color: var(--primary);
    text-decoration: none;
    font-size: 0.875rem;
    transition: color 0.2s ease;
    white-space: nowrap;
}

.download-link:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

.remove-link {
    color: #ef4444;
    text-decoration: none;
    font-size: 0.875rem;
    transition: color 0.2s ease;
    white-space: nowrap;
    margin-left: 0.5rem;
}

.remove-link:hover {
    color: #dc2626;
    text-decoration: underline;
}

/* 移动端适配 */
@media (max-width: 768px) {
    .tool-header {
        margin: 0.5rem 0;
        padding: 0.75rem 1rem;
    }

    .tool-actions {
        gap: 0.5rem;
    }

    .btn {
        padding: 0 0.75rem;
        font-size: 0.75rem;
        min-width: 60px;
        height: 1.75rem;
    }

    .img-workspace {
        padding: 1rem;
    }

    .img-dropzone {
        padding: 1.25rem;
        margin: 0;
    }

    .compress-item {
        grid-template-columns: 1fr auto;
        padding: 0.75rem;
        gap: 0.5rem;
    }
    
    .file-info {
        gap: 0.5rem;
    }
    
    .file-thumbnail {
        width: 32px;
        height: 32px;
    }
    
    .file-name {
        min-width: 120px;
        font-size: 0.75rem;
    }

    .file-size {
        font-size: 0.75rem;
    }
    
    .compress-result {
        justify-content: flex-end;
        font-size: 0.75rem;
    }

    .download-link {
        font-size: 0.75rem;
    }

    .remove-link {
        font-size: 0.75rem;
    }

    .compress-ratio {
        font-size: 0.75rem;
    }
}

/* 营销区域样式 */
.marketing-section {
    max-width: 1200px;
    margin: 4rem auto;
    padding: 0 2rem;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.marketing-title {
    font-size: 3rem;
    font-weight: 700;
    color: #1a1a1a;
    text-align: center;
    margin-bottom: 1.5rem;
    letter-spacing: -0.5px;
    background: linear-gradient(135deg, #2563eb 0%, #4f46e5 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.marketing-subtitle {
    font-size: 1.125rem;
    color: #4b5563;
    text-align: center;
    max-width: 800px;
    margin: 0 auto 4rem;
    line-height: 1.7;
    letter-spacing: 0.3px;
}

/* 主容器 */
.content-wrapper {
    display: flex;
    gap: 20px;
    height: 400px;
    margin: 20px 0;
}

/* 左侧图片区域 */
.demo-section {
    flex: 1;
    height: 100%;
}

.demo-compare {
    width: 100%;
    height: 100%;
}

.compare-container {
    position: relative;
    width: 100%;
    height: 100%;
    border-radius: 8px;
    overflow: hidden;
    background: #f8f9fa;
    cursor: col-resize;
    user-select: none;
}

.compare-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.compare-image.original {
    z-index: 1;
}

.compare-image.compressed {
    z-index: 2;
    clip-path: inset(0 50% 0 0);
}

.compare-info {
    position: absolute;
    top: 8px;
    left: 8px;
    right: 8px;
    display: flex;
    justify-content: space-between;
    z-index: 4;
    color: #fff;
    font-size: 12px;
}

.info-original,
.info-compressed {
    background: rgba(0, 0, 0, 0.6);
    padding: 4px 8px;
    border-radius: 4px;
}

.info-ratio {
    color: #10b981;
    margin-left: 8px;
}

.compare-slider {
    position: absolute;
    top: 0;
    left: 50%;
    bottom: 0;
    width: 4px;
    background: rgba(255, 255, 255, 0.9);
    transform: translateX(-50%);
    z-index: 3;
    cursor: col-resize;
}

.slider-button {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #2563eb;
    transform: translate(-50%, -50%);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #fff;
    cursor: col-resize;
    touch-action: none;
}

/* 右侧文案区域 */
.features-section {
    flex: 1;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 16px;
    background: #f8f9fa;
    border-radius: 12px;
}

.tool-links {
    margin-bottom: 12px;
}

.tool-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    background: linear-gradient(135deg, #2563eb 0%, #4f46e5 100%);
    color: white;
    text-decoration: none;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.3);
}

.tool-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.4);
    color: white;
    text-decoration: none;
}

.tool-link svg {
    width: 14px;
    height: 14px;
    stroke: currentColor;
    stroke-width: 2;
    fill: none;
}

.features-title {
    font-size: 18px;
    font-weight: 600;
    color: #2563eb;
    margin-bottom: 8px;
}

.features-desc {
    font-size: 14px;
    color: #666;
    margin-bottom: 24px;
    line-height: 1.5;
}

.feature-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
}

.feature-item {
    background: white;
    padding: 16px 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04);
    display: flex;
    flex-direction: column;
    gap: 6px;
    border-left: 3px solid #2563eb;
}

.feature-content h3 {
    font-size: 16px;
    font-weight: 600;
    color: #1a1a1a;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.feature-content h3::before {
    content: '';
    display: block;
    width: 4px;
    height: 4px;
    background: #2563eb;
    border-radius: 50%;
}

.feature-content p {
    font-size: 14px;
    color: #666;
    line-height: 1.5;
    margin: 0;
    padding-left: 12px;
}

/* 为什么选择我们 */
.why-choose-us {
    padding: 4rem 0;
    text-align: center;
}

.section-title {
    font-size: 2rem;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 3rem;
}

/* 特点图标区域 */
.features-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
    margin-bottom: 4rem;
}

.feature-item {
    text-align: center;
}

.feature-icon {
    width: 48px;
    height: 48px;
    margin: 0 auto 1rem;
    color: #2563eb;
}

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

.feature-desc {
    font-size: 0.875rem;
    color: #666;
    line-height: 1.6;
}

/* 用户评价区域 */
.testimonials-title {
    font-size: 1.75rem;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 2.5rem;
}

.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
}

.testimonial-card {
    background: #fff;
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.testimonial-content {
    font-size: 0.875rem;
    color: #666;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.testimonial-user {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    overflow: hidden;
}

.user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.user-info {
    text-align: left;
}

.user-name {
    font-size: 0.875rem;
    font-weight: 600;
    color: #1a1a1a;
}

.user-title {
    font-size: 0.75rem;
    color: #666;
}

/* 移动端适配 */
@media (max-width: 768px) {
    .why-choose-us {
        padding: 2rem 0;
    }

    .section-title {
        font-size: 1.5rem;
        margin-bottom: 2rem;
    }

    .features-grid,
    .testimonials-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .feature-icon {
        width: 40px;
        height: 40px;
    }

    .feature-title {
        font-size: 1rem;
    }
}

/* 移动端适配 */
@media (max-width: 768px) {
    .content-wrapper {
        flex-direction: column;
        height: auto;
        gap: 16px;
        margin: 16px 0;
    }

    .demo-section {
        aspect-ratio: 16/9;  /* 使用固定比例 */
        width: 100%;
        height: auto;
        min-height: 200px;
        max-height: 300px;
    }

    .demo-compare,
    .compare-container {
        height: 100%;
    }

    .compare-info {
        font-size: 11px;
        top: 6px;
        left: 6px;
        right: 6px;
    }

    .info-original,
    .info-compressed {
        padding: 3px 6px;
    }

    .slider-button {
        width: 24px;
        height: 24px;
    }

    .features-section {
        padding: 16px;
    }

    .tool-links {
        margin-bottom: 12px;
    }

    .tool-link {
        padding: 6px 12px;
        font-size: 13px;
    }

    .tool-link svg {
        width: 14px;
        height: 14px;
    }

    .features-title {
        font-size: 18px;
        margin-bottom: 8px;
    }

    .features-desc {
        font-size: 13px;
        margin-bottom: 16px;
    }

    .feature-list {
        gap: 8px;
    }

    .feature-item {
        padding: 12px 16px;
    }

    .feature-content h3 {
        font-size: 15px;
    }

    .feature-content p {
        font-size: 13px;
        padding-left: 10px;
    }
}

/* 小屏幕适配 */
@media (max-width: 480px) {
    .demo-section {
        min-height: 180px;
    }

    .compare-info {
        font-size: 10px;
    }

    .info-original,
    .info-compressed {
        padding: 2px 4px;
    }

    .features-section {
        padding: 12px;
    }

    .feature-item {
        padding: 10px 12px;
    }
} 