html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
    /* Navbar height */
}

:root {
    --primary-color: #3b5bdb;
    /* Example blue from reference */
    --primary-hover: #2f4bb5;
    --bg-color: #f8f9fc;
    --card-bg: #ffffff;
    --text-main: #333333;
    --text-muted: #666666;
    --border-color: #e0e0e0;
    --success-color: #27ae60;
    --radius-lg: 12px;
    --radius-md: 8px;
    --radius-sm: 4px;
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-main);
    line-height: 1.6;
    /* display: flex; REMOVED for full-width layout */
    /* justify-content: center; REMOVED for full-width layout */
    min-height: 100vh;
    /* padding: 20px; REMOVED for full-width layout */
    margin: 0;
    overflow-x: hidden;
    /* Prevent horizontal scroll causing white gaps */
}

.app-container {
    width: 100%;
    max-width: 1000px;
    margin: 0 auto;
}

/* Header */
.main-header {
    text-align: center;
    margin-bottom: 30px;
}

/* ... existing code ... */

/* Glassmorphism */
.glass {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    /* border-bottom: 1px solid rgba(0, 0, 0, 0.05); Removed to prevent lines */
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    /* Use shadow instead */
}

.glass-dark {
    /* If user wants DARK, this should be dark. If they want white glass, this is fine. 
       But I will remove the border which looks like a line. */
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    /* border: 1px solid rgba(0, 0, 0, 0.05); Removed to prevent lines */
    box-shadow: -4px 0 15px rgba(0, 0, 0, 0.1);
    /* Shadow for depth */
}

.main-header h1 {
    font-size: 2rem;
    font-weight: 700;
    color: #2d3748;
    margin-bottom: 8px;
}

.badge-browser {
    font-weight: 400;
    color: #718096;
    font-size: 1.5rem;
}

.subtitle {
    color: var(--text-muted);
}

/* Upload Section */
.upload-section {
    background: var(--card-bg);
    border-radius: 20px;
    box-shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.05);
    padding: 12px;
    margin-bottom: 30px;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 1px solid rgba(0, 0, 0, 0.02);
}

.upload-section:hover {
    transform: translateY(-5px) scale(1.01);
    box-shadow: 0 20px 40px -10px rgba(59, 91, 219, 0.15);
}

.dashed-border {
    border: 3px dashed #c084fc;
    /* Purple dashed border as per reference */
    border-radius: 24px;
    padding: 60px 40px;
    text-align: center;
    background-color: #ffffff;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.dashed-border:hover,
.dashed-border.dragover {
    background-color: #fdfaff;
    border-color: #a855f7;
    border-style: dashed;
    box-shadow: inset 0 0 20px rgba(192, 132, 252, 0.05);
}

.upload-icon {
    font-size: 4rem;
    color: #94a3b8;
    margin-bottom: 24px;
    transition: all 0.4s ease;
    display: inline-block;
}

.dashed-border:hover .upload-icon {
    color: #a855f7;
    transform: scale(1.05);
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-8px);
    }
}

.btn-gradient-purple {
    background: linear-gradient(135deg, #6366f1 0%, #a855f7 100%);
    border: none;
    cursor: pointer;
}

.btn-gradient-purple:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(168, 85, 247, 0.3);
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

.dashed-border:hover .upload-icon {
    color: var(--primary-color);
    transform: scale(1.1);
    filter: drop-shadow(0 10px 15px rgba(59, 91, 219, 0.2));
}

.upload-section h2 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 5px;
}

.clickable {
    color: var(--primary-color);
    text-decoration: underline;
    cursor: pointer;
}

.file-formats {
    font-size: 0.875rem;
    color: #718096;
}

/* Control Grid */
.control-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 25px;
}

.card {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    padding: 20px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
}

.card h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 15px;
    color: #2d3748;
}

/* Settings */
.setting-option {
    margin-bottom: 15px;
}

.radio-container {
    display: flex;
    align-items: center;
    cursor: pointer;
    margin-bottom: 5px;
    font-size: 0.95rem;
}

.radio-container input {
    margin-right: 10px;
    transform: scale(1.2);
    cursor: pointer;
}

.setting-desc {
    font-size: 0.85rem;
    color: #718096;
    margin-left: 26px;
    /* Align with text */
    margin-bottom: 5px;
}

.slider-container {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-left: 26px;
    margin-top: 5px;
}

input[type="range"] {
    flex: 1;
    height: 6px;
    border-radius: 5px;
    background: #e2e8f0;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--primary-color);
    cursor: pointer;
    box-shadow: 0 0 0 3px rgba(59, 91, 219, 0.2);
}

/* Stats */
.stats-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f0;
    font-size: 0.95rem;
}

.stats-row:last-of-type {
    border-bottom: none;
}

.stats-row.highlight {
    font-weight: 600;
    color: var(--success-color);
}

.visual-icons {
    display: flex;
    justify-content: flex-end;
    margin-top: 10px;
    gap: -10px;
    /* Overlap effect */
}

.stack-icon {
    font-size: 2rem;
    margin-left: -15px;
    transform: rotate(15deg);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.btn-help {
    margin-top: 15px;
    background: transparent;
    border: 1px solid #e2e8f0;
    padding: 5px 12px;
    border-radius: 4px;
    font-size: 0.85rem;
    cursor: pointer;
    color: #718096;
}

/* View Toggle */
.view-toggle {
    display: flex;
    justify-content: center;
    background: #f1f5f9;
    border-radius: 12px;
    padding: 4px;
    width: fit-content;
    margin: 0 auto 24px;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.toggle-btn {
    border: none;
    background: transparent;
    padding: 10px 24px;
    font-size: 0.875rem;
    font-weight: 600;
    color: #64748b;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.toggle-btn.active {
    background: white;
    color: var(--primary-color);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.toggle-btn:not(.active):hover {
    color: #334155;
    background: rgba(255, 255, 255, 0.5);
}

/* Comparison Viewer */
.comparison-container {
    width: 100%;
    height: 400px;
    /* Fixed height for consistency */
    position: relative;
    background: #e2e8f0;
    /* Placeholder background */
    border-radius: var(--radius-lg);
    overflow: hidden;
    margin-bottom: 25px;
    box-shadow: var(--shadow-md);
}

.compare-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
    cursor: zoom-in;
    /* Indicate zoomability */
}

.compare-wrapper:active {
    cursor: grab;
    /* Indicate pannability when clicking */
}

.image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.image-overlay img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    /* Or cover depending on preference, contain is safer for whole image */
    display: block;
    transition: transform 0.1s ease-out;
    /* Smooth zoom */
    will-change: transform;
}

.compressed-overlay {
    z-index: 1;
}

.original-overlay {
    z-index: 2;
    width: 100%;
    /* Full width, clipped via clip-path */
    clip-path: inset(0 50% 0 0);
    /* Initial state: show 50% */
    border-right: none;
    /* Border handled by slider handle now */
}

.label-tag {
    position: absolute;
    top: 15px;
    padding: 4px 10px;
    border-radius: 4px;
    color: white;
    font-size: 0.85rem;
    font-weight: 600;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    z-index: 3;
    pointer-events: none;
}

.original-overlay .label-tag {
    left: 15px;
    background: rgba(0, 0, 0, 0.4);
}

.compressed-overlay .label-tag {
    right: 15px;
    background: rgba(59, 91, 219, 0.6);
}

.slider-handle {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 40px;
    height: 100%;
    transform: translateX(-50%);
    cursor: ew-resize;
    z-index: 10;
    display: flex;
    justify-content: center;
    align-items: center;
}

.handle-line {
    width: 2px;
    height: 100%;
    background: white;
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.2);
}

.handle-circle {
    position: absolute;
    width: 44px;
    height: 44px;
    background: white;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
    color: var(--primary-color);
}

/* Footer Actions */
.footer-actions {
    margin-top: 30px;
    border-top: 1px solid #e0e0e0;
    padding-top: 20px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.trust-badges {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 20px;
    color: #4a5568;
    font-size: 0.9rem;
}

.trust-badges span i {
    color: var(--success-color);
    margin-right: 5px;
}

.action-buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

.btn {
    padding: 12px 24px;
    border-radius: var(--radius-md);
    font-weight: 600;
    cursor: pointer;
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: transform 0.1s;
}

.btn:active {
    transform: scale(0.98);
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
    border: none;
    box-shadow: 0 2px 4px rgba(59, 91, 219, 0.2);
}

.btn-primary:hover {
    background-color: var(--primary-hover);
}

.btn-outline {
    background-color: transparent;
    color: #4a5568;
    border: 1px solid #cbd5e0;
}

.btn-danger {
    background-color: transparent;
    color: #e53e3e;
    border: 1px solid #fed7d7;
}

.btn-danger:hover {
    background-color: #fff5f5;
}

/* Side by Side Mode Support */
.compare-wrapper.side-by-side {
    display: flex;
    gap: 10px;
}

.compare-wrapper.side-by-side .image-overlay {
    position: relative;
    width: 50%;
    border: none;
    clip-path: none !important;
    /* Override inline styles */
}

.compare-wrapper.side-by-side .slider-handle {
    display: none;
}

/* Responsive */
@media (max-width: 768px) {
    .container {
        padding-left: 1.25rem;
        padding-right: 1.25rem;
    }

    .main-header {
        margin-bottom: 20px;
    }

    .main-header h1 {
        font-size: 1.75rem;
        line-height: 1.2;
    }

    .badge-browser {
        display: block;
        font-size: 1.1rem;
        margin-top: 4px;
        opacity: 0.8;
    }

    .subtitle {
        font-size: 0.95rem;
    }

    /* Upload Section */
    .dashed-border {
        padding: 40px 20px;
        border-radius: 20px;
    }

    .upload-icon {
        font-size: 3rem;
        margin-bottom: 16px;
    }

    .upload-section h2 {
        font-size: 1.15rem;
    }

    /* Control Grid */
    .control-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .card {
        padding: 16px;
    }

    /* Comparison Viewer */
    .comparison-container {
        height: 320px;
        /* Improved mobile height */
        margin-bottom: 20px;
    }

    .label-tag {
        font-size: 0.75rem;
        padding: 3px 8px;
        top: 10px;
    }

    .handle-circle {
        width: 36px;
        height: 36px;
    }

    .handle-circle svg {
        width: 18px;
        height: 18px;
    }

    /* View Toggle */
    .view-toggle {
        width: 100%;
        display: flex;
    }

    .toggle-btn {
        flex: 1;
        padding: 10px 12px;
        font-size: 0.8rem;
    }

    /* Footer Actions */
    .footer-actions {
        padding-top: 16px;
        gap: 16px;
    }

    .action-buttons {
        flex-direction: column;
        width: 100%;
    }

    .btn {
        width: 100%;
        justify-content: center;
        padding: 14px;
    }

    .trust-badges {
        gap: 12px;
        font-size: 0.8rem;
    }

    /* Side by Side Mode Support on Mobile */
    .compare-wrapper.side-by-side {
        flex-direction: column;
        height: auto;
    }

    .comparison-container:has(.side-by-side) {
        height: auto;
    }

    .compare-wrapper.side-by-side .image-overlay {
        width: 100%;
        height: 200px;
    }
}

@media (max-width: 480px) {
    .main-header h1 {
        font-size: 1.5rem;
    }

    .comparison-container {
        height: 280px;
    }

    .dashed-border {
        padding: 30px 15px;
    }
}


@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');

/* Glassmorphism */
.glass {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    /* Border removed to fix white line issue */
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.glass-dark {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    /* Border removed to fix white line issue */
    box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
}

/* Navbar sticky */
.navbar-sticky {
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: all 0.3s ease;
}

/* Mobile menu */
.mobile-menu {
    transform: translateX(100%);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.mobile-menu.active {
    transform: translateX(0);
}

/* Hover effects */
.nav-link {
    position: relative;
    transition: all 0.3s ease;
}

.nav-link:hover {
    color: #667eea;
}

/* Button gradients */
.btn-gradient {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    transition: all 0.3s ease;
}

.btn-gradient:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.4);
}

/* Social icons */
.social-icon {
    transition: all 0.3s ease;
}

.social-icon:hover {
    transform: translateY(-3px) scale(1.1);
}

/* Footer links */
.footer-link {
    transition: all 0.3s ease;
    position: relative;
    display: inline-block;
}

.footer-link:hover {
    color: #667eea;
    transform: translateX(5px);
}

/* Dropdown menu */
.dropdown {
    position: relative;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 220px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 100;
    margin-top: 8px;
}

.dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-item {
    padding: 12px 16px;
    color: #4b5563;
    font-weight: 500;
    transition: all 0.2s ease;
    display: block;
}

.dropdown-item:first-child {
    border-radius: 12px 12px 0 0;
}

.dropdown-item:last-child {
    border-radius: 0 0 12px 12px;
}

.dropdown-item:hover {
    background: #f3f4f6;
    color: #667eea;
    padding-left: 20px;
}

/* Mobile dropdown */
.mobile-dropdown-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.mobile-dropdown-content.active {
    max-height: 500px;
}

.chevron {
    transition: transform 0.3s ease;
}

.chevron.rotated {
    transform: rotate(180deg);
}

/* Logo gradient */
.logo-gradient {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in-up {
    animation: fadeInUp 0.6s ease-out forwards;
}

/* --- SEO Content Sections (Advanced Layout) --- */
.content-sections {
    font-family: 'Inter', sans-serif;
}

/* Glassmorphism Cards */
.feature-item,
.tool-card,
.faq-item {
    background: rgba(255, 255, 255, 0.7) !important;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.4) !important;
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.05) !important;
}

/* Feature Item Enhancements */
.feature-item {
    transition: all 0.5s cubic-bezier(0.23, 1, 0.32, 1);
}

.feature-item:hover {
    transform: translateY(-10px) scale(1.02);
    background: rgba(255, 255, 255, 0.9) !important;
    box-shadow: 0 20px 40px -10px rgba(59, 130, 246, 0.15) !important;
}

.feature-item h3 {
    position: relative;
    display: inline-block;
}

.feature-item h3::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 50%;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, currentColor, transparent);
    transition: width 0.3s ease;
    transform: translateX(-50%);
}

.feature-item:hover h3::after {
    width: 80%;
}

/* Tool Card Enhancements */
.tool-card {
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
}

.tool-card:hover {
    transform: translateY(-8px);
    border-color: rgba(59, 130, 246, 0.3) !important;
    box-shadow: 0 15px 30px -5px rgba(0, 0, 0, 0.08) !important;
}

.tool-card::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: left 0.6s ease-in-out;
}

.tool-card:hover::before {
    left: 100%;
}

/* FAQ Redesign - Advanced */
.faq-item {
    margin-bottom: 1.25rem;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1.5px solid rgba(0, 0, 0, 0.05) !important;
}

.faq-item:hover {
    border-color: rgba(168, 85, 247, 0.2) !important;
    background: rgba(255, 255, 255, 0.9) !important;
    transform: translateX(4px);
}

.faq-item.active {
    border-color: #a855f7 !important;
    background: #ffffff !important;
    box-shadow: 0 10px 30px -10px rgba(168, 85, 247, 0.15) !important;
    transform: translateX(0);
}

.faq-prefix {
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.faq-item.active .faq-prefix {
    background: linear-gradient(135deg, #6366f1 0%, #a855f7 100%);
    color: white;
    transform: scale(1.1);
}

.faq-toggle {
    transition: all 0.3s ease;
    cursor: pointer;
}

.faq-content {
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    max-height: 0;
    overflow: hidden;
    opacity: 0;
}

.faq-item.active .faq-content {
    max-height: 500px;
    opacity: 1;
}

.faq-inner {
    border-top: 1px solid transparent;
    transition: border-color 0.4s ease;
}

.faq-item.active .faq-inner {
    border-top-color: rgba(0, 0, 0, 0.03);
}

/* --- SEO Content Sections Responsive --- */
@media (max-width: 768px) {
    .content-sections {
        padding-top: 3rem;
        padding-bottom: 3rem;
    }

    .about-section h2,
    .more-tools-section h2,
    .faq-section h2 {
        font-size: 1.75rem;
        margin-bottom: 1.5rem;
    }

    .about-section p {
        font-size: 1rem;
        line-height: 1.6;
    }

    .features-grid {
        gap: 1.5rem;
        margin-bottom: 3rem;
    }

    .feature-item {
        padding: 1.5rem;
    }

    .feature-item .w-16 {
        width: 3.5rem;
        height: 3.5rem;
        margin-bottom: 1rem;
    }

    .feature-item h3 {
        font-size: 1.25rem;
    }

    .more-tools-section {
        margin-bottom: 3rem;
    }

    .faq-section {
        padding: 0 0.5rem;
    }

    .faq-toggle {
        padding: 1.25rem;
    }

    .faq-toggle span.font-bold {
        font-size: 0.95rem;
    }

    .faq-inner {
        padding: 0 1.25rem 1.25rem 1.25rem;
        font-size: 0.9rem;
    }
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-in {
    animation: fadeIn 0.5s ease-out forwards;
}