/* Background Remover Tool Styles */

/* Tool Container */
.tool-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Tool Header */
.tool-header {
    text-align: center;
    margin-bottom: 40px;
    padding: 40px 20px;
    color: #2d3748;
}

.tool-icon {
    font-size: 4rem;
    margin-bottom: 20px;
    color: #667eea;
}

.tool-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 15px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.tool-description {
    font-size: 1.2rem;
    opacity: 0.95;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

/* Section Cards */
.section-card {
    background: white;
    border-radius: 15px;
    padding: 30px;
    margin-bottom: 30px;
    
    border: 1px solid #e8ecf4;
    transition: all 0.3s ease;
}

.section-card:hover {
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
    transform: translateY(-2px);
}

.section-header {
    display: flex;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f0f4f8;
}

.section-header i {
    font-size: 1.5rem;
    color: #667eea;
    margin-right: 12px;
}

.section-header h2,
.section-header h3 {
    margin: 0;
    color: #2d3748;
    font-weight: 600;
}

/* Upload Area */
.upload-area {
    border: 3px dashed #cbd5e0;
    border-radius: 15px;
    padding: 60px 30px;
    text-align: center;
    background: #f7fafc;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.upload-area:hover {
    border-color: #667eea;
    background: #edf2f7;
    transform: scale(1.02);
}

.upload-area.dragover {
    border-color: #667eea;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
    box-shadow: inset 0 0 20px rgba(102, 126, 234, 0.2);
}

.upload-content {
    position: relative;
    z-index: 2;
}

.upload-icon {
    font-size: 4rem;
    color: #a0aec0;
    margin-bottom: 20px;
    transition: all 0.3s ease;
}

.upload-area:hover .upload-icon {
    color: #667eea;
    transform: scale(1.1);
}

.upload-area h3 {
    font-size: 1.5rem;
    color: #4a5568;
    margin-bottom: 15px;
    font-weight: 600;
}

.upload-area p {
    color: #718096;
    margin: 10px 0;
    font-size: 1.1rem;
}

.upload-info {
    font-size: 0.9rem !important;
    color: #a0aec0 !important;
    margin-top: 20px !important;
}

/* Upload Tips */
.upload-tips {
    margin-top: 30px;
    padding: 25px;
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border-radius: 12px;
    border-left: 4px solid #0ea5e9;
}

.upload-tips h4 {
    color: #0c4a6e;
    margin-bottom: 15px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

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

.upload-tips li {
    color: #0f172a;
    margin-bottom: 8px;
    line-height: 1.5;
}

/* Processing Section */
.processing-content {
    text-align: center;
    padding: 40px 20px;
}

.progress-container {
    max-width: 400px;
    margin: 0 auto 30px;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: #e2e8f0;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 15px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    border-radius: 10px;
    width: 0%;
    transition: width 0.3s ease;
    animation: progressPulse 2s infinite;
}

@keyframes progressPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.progress-text {
    font-weight: 600;
    color: #4a5568;
    font-size: 1.1rem;
}

.processing-info {
    color: #718096;
    font-size: 1rem;
    line-height: 1.6;
}

/* Result Section */
.result-content {
    padding: 20px 0;
}

.comparison-container {
    margin-bottom: 40px;
}

.image-comparison {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 30px;
    align-items: center;
}

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

.comparison-item h4 {
    color: #2d3748;
    margin-bottom: 20px;
    font-weight: 600;
    font-size: 1.2rem;
}

.image-container {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    background: 
        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;
}

.preview-image {
    width: 100%;
    height: auto;
    max-height: 400px;
    object-fit: contain;
    display: block;
}

.image-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
    color: white;
    padding: 15px;
    font-size: 0.9rem;
    text-align: left;
}

.comparison-arrow {
    font-size: 2rem;
    color: #667eea;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateX(0); }
    40% { transform: translateX(-5px); }
    60% { transform: translateX(5px); }
}

/* Action Buttons */
.result-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

/* Error Section */
.error-card {
    border-left: 4px solid #e53e3e;
    background: linear-gradient(135deg, #fed7d7 0%, #feb2b2 100%);
}

.error-content {
    text-align: center;
    padding: 20px;
}

.error-content p {
    color: #742a2a;
    font-size: 1.1rem;
    margin-bottom: 25px;
}

.error-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    white-space: nowrap;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
}

.btn-success {
    background: linear-gradient(135deg, #48bb78 0%, #38a169 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(72, 187, 120, 0.4);
}

.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(72, 187, 120, 0.6);
}

.btn-secondary {
    background: linear-gradient(135deg, #718096 0%, #4a5568 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(113, 128, 150, 0.4);
}

.btn-secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(113, 128, 150, 0.6);
}

.btn-outline {
    background: transparent;
    color: #667eea;
    border: 2px solid #667eea;
}

.btn-outline:hover {
    background: #667eea;
    color: white;
    transform: translateY(-2px);
}

/* Utility Classes */
.hidden {
    display: none !important;
}

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

/* Notification */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    max-width: 400px;
    animation: slideInRight 0.3s ease;
}

.notification-content {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    border-left: 4px solid #48bb78;
    display: flex;
    align-items: center;
    gap: 15px;
}

.notification-icon {
    font-size: 1.5rem;
    color: #48bb78;
}

.notification-message {
    flex: 1;
    color: #2d3748;
    font-weight: 500;
}

.notification-close {
    background: none;
    border: none;
    color: #a0aec0;
    cursor: pointer;
    font-size: 1.2rem;
    padding: 5px;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.notification-close:hover {
    background: #f7fafc;
    color: #4a5568;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Related Tools */
.related-tools {
    margin: 60px auto 40px;
    max-width: 1200px;
    padding: 0 20px;
}

.related-tools-header {
    text-align: center;
    margin-bottom: 40px;
}

.related-tools-header h3 {
    color: #2d3748;
    font-size: 2rem;
    margin-bottom: 10px;
    font-weight: 700;
}

.related-tools-header p {
    color: #718096;
    font-size: 1.1rem;
}

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

.related-tool-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 30px 20px;
    background: white;
    border-radius: 12px;
    text-decoration: none;
    color: #4a5568;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    border: 1px solid #e2e8f0;
}

.related-tool-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    color: #667eea;
}

.related-tool-card i {
    font-size: 2.5rem;
    margin-bottom: 15px;
    color: #667eea;
}

.related-tool-card span {
    font-weight: 600;
    text-align: center;
}

/* SEO Content */
.seo-content {
    max-width: 1000px;
    margin: 60px auto;
    padding: 0 20px;
}

.seo-section {
    background: white;
    padding: 40px;
    border-radius: 15px;
    
}

.seo-section h2 {
    color: #2d3748;
    font-size: 2rem;
    margin-bottom: 20px;
    font-weight: 700;
}

.seo-section h3 {
    color: #4a5568;
    font-size: 1.5rem;
    margin: 30px 0 15px;
    font-weight: 600;
}

.seo-section p {
    color: #718096;
    line-height: 1.7;
    margin-bottom: 20px;
    font-size: 1rem;
}

.seo-section ul,
.seo-section ol {
    color: #4a5568;
    line-height: 1.6;
    margin-bottom: 20px;
    padding-left: 25px;
}

.seo-section li {
    margin-bottom: 8px;
}

.seo-section strong {
    color: #2d3748;
    font-weight: 600;
}

/* Mobile Responsive Styles */
@media (max-width: 768px) {
    .tool-container {
        padding: 15px;
    }

    .tool-header {
        padding: 30px 15px;
        margin-bottom: 30px;
    }

    .tool-icon {
        font-size: 3rem;
        margin-bottom: 15px;
    }

    .tool-title {
        font-size: 2rem;
    }

    .tool-description {
        font-size: 1rem;
    }

    .section-card {
        padding: 20px;
        margin-bottom: 20px;
    }

    .upload-area {
        padding: 40px 20px;
    }

    .upload-icon {
        font-size: 3rem;
    }

    .upload-area h3 {
        font-size: 1.3rem;
    }

    .image-comparison {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .comparison-arrow {
        transform: rotate(90deg);
        font-size: 1.5rem;
    }

    .result-actions {
        flex-direction: column;
        align-items: center;
    }

    .btn {
        width: 100%;
        max-width: 280px;
        justify-content: center;
    }

    .related-tools-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 15px;
    }

    .related-tool-card {
        padding: 20px 15px;
    }

    .related-tool-card i {
        font-size: 2rem;
    }

    .seo-content {
        padding: 0 15px;
    }

    .seo-section {
        padding: 25px 20px;
    }

    .seo-section h2 {
        font-size: 1.7rem;
    }

    .seo-section h3 {
        font-size: 1.3rem;
    }

    .notification {
        left: 15px;
        right: 15px;
        max-width: none;
    }
}

@media (max-width: 480px) {
    .tool-title {
        font-size: 1.8rem;
    }

    .upload-area {
        padding: 30px 15px;
    }

    .upload-area h3 {
        font-size: 1.2rem;
    }

    .btn {
        padding: 10px 20px;
        font-size: 0.9rem;
    }

    .related-tools-grid {
        grid-template-columns: 1fr 1fr;
    }

    .image-container {
        margin: 0 -10px;
    }
}

/* Touch-friendly enhancements */
@media (hover: none) and (pointer: coarse) {
    .btn {
        min-height: 48px;
        padding: 15px 24px;
    }

    .upload-area {
        min-height: 200px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .related-tool-card {
        min-height: 120px;
        padding: 25px 20px;
    }

    .notification-close {
        min-width: 44px;
        min-height: 44px;
    }
}

/* High DPI displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .preview-image {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .section-card {
        background: #2d3748;
        border-color: #4a5568;
        color: #e2e8f0;
    }

    .upload-area {
        background: #4a5568;
        border-color: #718096;
        color: #e2e8f0;
    }

    .upload-area:hover {
        background: #718096;
    }

    .seo-section {
        background: #2d3748;
        color: #e2e8f0;
    }

    .related-tool-card {
        background: #2d3748;
        border-color: #4a5568;
        color: #e2e8f0;
    }
}

/* Print styles */
@media print {
    .tool-container {
        box-shadow: none;
    }

    .btn,
    .notification,
    .related-tools {
        display: none !important;
    }

    .section-card {
        box-shadow: none;
        border: 1px solid #e2e8f0;
    }
}
