/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: #2d3748;
    background-color: #f8fafc;
    font-size: 16px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header Styles */
.header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 4rem 0;
    text-align: center;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.main-heading {
    font-size: 3rem;
    font-weight: 700;
    margin: 0;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Main Content */
.main {
    padding: 4rem 0;
}

/* Example Sections */
.example-section {
    background: white;
    border-radius: 16px;
    padding: 3rem 2rem;
    margin-bottom: 3rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    border: 1px solid #e2e8f0;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.example-section:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.section-heading {
    font-size: 2rem;
    font-weight: 600;
    color: #1a202c;
    margin-bottom: 2rem;
    text-align: center;
    position: relative;
    padding-bottom: 1rem;
}

.section-heading::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 2px;
}

/* Image Layouts */
.image-comparison {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

.single-image {
    display: flex;
    justify-content: center;
    margin-bottom: 2rem;
}

.image-container {
    text-align: center;
    position: relative;
}

.example-image {
    width: 100%;
    max-width: 400px;
    height: 300px;
    object-fit: cover;
    border-radius: 12px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.example-image:hover {
    transform: scale(1.05);
}

.image-label {
    margin-top: 1rem;
    font-weight: 500;
    color: #4a5568;
    font-size: 1.1rem;
}

/* Special Effects for Images */
.opacity-reduced {
    opacity: 0.5;
}

/* Format Convert Overlay */
.format-convert {
    position: relative;
}

.overlay-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(102, 126, 234, 0.9);
    color: white;
    padding: 1rem 2rem;
    border-radius: 25px;
    font-weight: 600;
    font-size: 1.2rem;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

/* Background Remove Effect */
.bg-remove {
    background: 
        linear-gradient(45deg, #f1f1f1 25%, transparent 25%), 
        linear-gradient(-45deg, #f1f1f1 25%, transparent 25%), 
        linear-gradient(45deg, transparent 75%, #f1f1f1 75%), 
        linear-gradient(-45deg, transparent 75%, #f1f1f1 75%);
    background-size: 20px 20px;
    background-position: 0 0, 0 10px, 10px -10px, -10px 0px;
    padding: 2rem;
    border-radius: 12px;
}

/* Description Styles */
.description {
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.description p {
    font-size: 1.125rem;
    line-height: 1.7;
    color: #4a5568;
    margin-bottom: 1rem;
}

.description p:last-child {
    margin-bottom: 0;
}

/* Footer */
.footer {
    background: #2d3748;
    color: white;
    text-align: center;
    padding: 2rem 0;
    margin-top: 2rem;
}

.footer p {
    margin: 0;
    opacity: 0.8;
}

/* Responsive Design */
@media (max-width: 768px) {
    .main-heading {
        font-size: 2.5rem;
    }
    
    .header {
        padding: 3rem 0;
    }
    
    .main {
        padding: 2rem 0;
    }
    
    .example-section {
        padding: 2rem 1.5rem;
        margin-bottom: 2rem;
    }
    
    .section-heading {
        font-size: 1.75rem;
    }
    
    .image-comparison {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .example-image {
        height: 250px;
    }
    
    .overlay-text {
        font-size: 1rem;
        padding: 0.75rem 1.5rem;
    }
    
    .description p {
        font-size: 1rem;
    }
    
    .container {
        padding: 0 15px;
    }
}

@media (max-width: 480px) {
    .main-heading {
        font-size: 2rem;
    }
    
    .header {
        padding: 2rem 0;
    }
    
    .example-section {
        padding: 1.5rem 1rem;
    }
    
    .section-heading {
        font-size: 1.5rem;
    }
    
    .example-image {
        height: 200px;
    }
    
    .overlay-text {
        font-size: 0.9rem;
        padding: 0.5rem 1rem;
    }
    
    .bg-remove {
        padding: 1rem;
    }
}

/* Loading Animation */
.example-image {
    animation: fadeInUp 0.6s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Focus states for accessibility */
.example-image:focus {
    outline: 3px solid #667eea;
    outline-offset: 4px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .example-section {
        border: 2px solid #2d3748;
    }
    
    .section-heading::after {
        background: #2d3748;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .example-image,
    .example-section {
        animation: none;
        transition: none;
    }
    
    .example-image:hover,
    .example-section:hover {
        transform: none;
    }
    
    html {
        scroll-behavior: auto;
    }
}