/* 工具页面专用样式 */

.tool-page {
    min-height: 100vh;
}

/* 工具Hero区域 */
.tool-hero {
    background: var(--gradient-primary);
    color: white;
    padding: 3rem 0;
    text-align: center;
}

.tool-hero-content {
    max-width: 800px;
    margin: 0 auto;
}

.tool-title {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.tool-description {
    font-size: 1.1rem;
    margin-bottom: 2rem;
    opacity: 0.95;
    line-height: 1.8;
}

.tool-features {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
}

.feature-tag {
    background: rgba(255, 255, 255, 0.2);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    backdrop-filter: blur(10px);
}

/* 上传区域 */
.upload-section {
    padding: 3rem 0;
    background: var(--bg-secondary);
}

.upload-container {
    max-width: 700px;
    margin: 0 auto;
}

.upload-area {
    background: white;
    border: 3px dashed var(--border-color);
    border-radius: 16px;
    padding: 3rem 2rem;
    text-align: center;
    transition: all 0.3s;
    cursor: pointer;
}

.upload-area:hover,
.upload-area.dragover {
    border-color: var(--primary-color);
    background: rgba(99, 102, 241, 0.05);
}

.upload-icon {
    font-size: 4rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.upload-area h3 {
    color: var(--text-color);
    margin-bottom: 0.5rem;
    font-size: 1.3rem;
}

.upload-hint {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.btn-upload {
    background: var(--gradient-primary);
    color: white;
    padding: 0.75rem 2rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-upload:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

/* 处理区域 */
.process-section {
    padding: 3rem 0;
    background: white;
}

.process-container {
    max-width: 1000px;
    margin: 0 auto;
}

.image-compare {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 2rem;
    align-items: center;
    margin-bottom: 2rem;
}

.image-box {
    text-align: center;
}

.image-box h3 {
    margin-bottom: 1rem;
    color: var(--text-color);
    font-size: 1.2rem;
}

.image-wrapper {
    position: relative;
    background: var(--bg-secondary);
    border-radius: 12px;
    overflow: hidden;
    min-height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.image-wrapper img {
    max-width: 100%;
    max-height: 500px;
    display: block;
    border-radius: 8px;
}

.arrow-icon {
    font-size: 2rem;
    color: var(--primary-color);
}

.processing-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.95);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(5px);
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid var(--border-color);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 1rem;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.action-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.btn-primary,
.btn-secondary {
    padding: 0.75rem 2rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-primary {
    background: var(--gradient-primary);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-secondary {
    background: white;
    color: var(--text-color);
    border: 2px solid var(--border-color);
}

.btn-secondary:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

/* 示例展示区域 */
.examples-section {
    padding: 4rem 0;
    background: var(--bg-secondary);
}

.section-title {
    font-size: 2rem;
    text-align: center;
    margin-bottom: 0.5rem;
    color: var(--text-color);
    font-weight: 600;
}

.section-subtitle {
    text-align: center;
    color: var(--text-secondary);
    margin-bottom: 3rem;
    font-size: 1.1rem;
}

.examples-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.example-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: var(--shadow-md);
    transition: transform 0.3s;
}

.example-card:hover {
    transform: translateY(-4px);
}

.example-images {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
}

.example-image {
    position: relative;
}

.example-label {
    position: absolute;
    top: 8px;
    left: 8px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 0.8rem;
    z-index: 1;
}

.placeholder-image {
    aspect-ratio: 1;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: white;
}

.placeholder-image.before {
    background: linear-gradient(135deg, #94a3b8 0%, #64748b 100%);
}

.placeholder-image.after {
    background: var(--gradient-primary);
}

.placeholder-image p {
    font-size: 0.9rem;
    margin-top: 0.5rem;
}

.example-desc {
    color: var(--text-secondary);
    text-align: center;
    font-size: 0.95rem;
}

/* 特性详细说明 */
.features-detail-section {
    padding: 4rem 0;
    background: white;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.feature-card {
    text-align: center;
    padding: 2rem;
    border-radius: 12px;
    background: var(--bg-secondary);
    transition: all 0.3s;
}

.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.feature-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    background: var(--gradient-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: white;
}

.feature-card h3 {
    margin-bottom: 1rem;
    color: var(--text-color);
    font-size: 1.2rem;
}

.feature-card p {
    color: var(--text-secondary);
    line-height: 1.8;
}

/* FAQ区域 */
.faq-section {
    padding: 4rem 0;
    background: var(--bg-secondary);
}

.faq-list {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    background: white;
    border-radius: 8px;
    margin-bottom: 1rem;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.faq-question {
    padding: 1.5rem;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background 0.3s;
}

.faq-question:hover {
    background: var(--bg-secondary);
}

.faq-question h4 {
    color: var(--text-color);
    font-weight: 600;
    font-size: 1.05rem;
}

.faq-question i {
    color: var(--primary-color);
    transition: transform 0.3s;
}

.faq-item.active .faq-question i {
    transform: rotate(180deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
}

.faq-item.active .faq-answer {
    max-height: 200px;
}

.faq-answer p {
    padding: 0 1.5rem 1.5rem;
    color: var(--text-secondary);
    line-height: 1.8;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .tool-title {
        font-size: 2rem;
    }
    
    .image-compare {
        grid-template-columns: 1fr;
    }
    
    .arrow-icon {
        transform: rotate(90deg);
    }
    
    .examples-grid {
        grid-template-columns: 1fr;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    .action-buttons {
        flex-direction: column;
    }
    
    .btn-primary,
    .btn-secondary {
        width: 100%;
        justify-content: center;
    }
}
