 :root {
        --primary: #6366f1;
        --primary-dark: #4f46e5;
        --secondary: #ec4899;
        --dark: #1f2937;
        --darker: #111827;
        --light: #f3f4f6;
        --lighter: #f9fafb;
        --success: #10b981;
        --error: #ef4444;
        --warning: #f59e0b;
        --gray: #9ca3af;
        --gray-light: #d1d5db;
        --radius: 12px;
        --shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
        --transition: all 0.3s ease;
    }

    * {
        margin: 0;
        padding: 0;
        box-sizing: border-box;
    }

    body {
        font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
        background: linear-gradient(135deg, var(--darker) 0%, var(--dark) 100%);
        color: var(--light);
        line-height: 1.6;
        min-height: 100vh;
    }

    /* Mobile First Responsive Design */
    .container {
        width: 100%;
        padding: 0 15px;
        margin: 0 auto;
    }

    /* Hero Section */
    .hero-section {
        background: linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, rgba(236, 72, 153, 0.1) 100%);
        backdrop-filter: blur(20px);
        border-radius: var(--radius);
        margin: 15px auto;
        padding: 40px 20px;
        text-align: center;
        border: 1px solid rgba(255, 255, 255, 0.1);
        position: relative;
        overflow: hidden;
    }

    .hero-title {
        font-size: 2rem;
        font-weight: 700;
        background: linear-gradient(to right, var(--primary), var(--secondary));
        -webkit-background-clip: text;
        background-clip: text;
        color: transparent;
        margin-bottom: 15px;
    }

    .hero-subtitle {
        font-size: 1rem;
        color: var(--gray-light);
        margin-bottom: 30px;
        max-width: 100%;
    }

    .hero-features {
        display: grid;
        grid-template-columns: 1fr;
        gap: 20px;
        margin-top: 30px;
    }

    .feature-card {
        background: rgba(255, 255, 255, 0.05);
        backdrop-filter: blur(10px);
        border: 1px solid rgba(255, 255, 255, 0.1);
        border-radius: var(--radius);
        padding: 20px 15px;
        text-align: center;
        transition: var(--transition);
    }

    .feature-icon {
        font-size: 2.5rem;
        margin-bottom: 15px;
        display: block;
    }

    .feature-card h3 {
        font-size: 1.2rem;
        font-weight: 600;
        color: var(--light);
        margin-bottom: 10px;
    }

    .feature-card p {
        color: var(--gray-light);
        font-size: 0.9rem;
        line-height: 1.5;
    }

    .hero-cta {
        margin-top: 30px;
    }

    .cta-button {
        display: inline-block;
        padding: 12px 25px;
        background: linear-gradient(to right, var(--primary), var(--primary-dark));
        color: white;
        text-decoration: none;
        border-radius: var(--radius);
        font-weight: 600;
        font-size: 1rem;
        transition: var(--transition);
    }

    /* Stats Section */
    .stats-section {
        background: rgba(0, 0, 0, 0.3);
        backdrop-filter: blur(15px);
        border-radius: var(--radius);
        margin: 30px auto;
        padding: 30px 20px;
        text-align: center;
        border: 1px solid rgba(255, 255, 255, 0.1);
    }

    .stats-grid {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }

    .stat-item {
        padding: 15px;
    }

    .stat-number {
        font-size: 1.8rem;
        font-weight: 700;
        background: linear-gradient(to right, var(--primary), var(--secondary));
        -webkit-background-clip: text;
        background-clip: text;
        color: transparent;
        margin-bottom: 8px;
    }

    .stat-label {
        color: var(--gray-light);
        font-size: 0.8rem;
        font-weight: 500;
    }

    /* Tools Section */
    .tools-section {
        padding: 30px 15px;
        max-width: 1200px;
        margin: 0 auto;
    }
    
    .tools-heading {
        text-align: center;
        margin-bottom: 25px;
        font-size: 1.8rem;
        background: linear-gradient(to right, var(--primary), var(--secondary));
        -webkit-background-clip: text;
        background-clip: text;
        color: transparent;
        font-weight: 700;
    }
    
    .tools-grid {
        display: grid;
        grid-template-columns: 1fr;
        gap: 15px;
        margin-top: 20px;
    }
    
    .tool-card {
        background: rgba(255, 255, 255, 0.05);
        backdrop-filter: blur(10px);
        border: 1px solid rgba(255, 255, 255, 0.1);
        border-radius: var(--radius);
        padding: 20px 15px;
        text-align: center;
        transition: var(--transition);
        box-shadow: var(--shadow);
    }
    
    .tool-card h3 {
        font-size: 1.2rem;
        margin-bottom: 10px;
        color: var(--light);
    }
    
    .tool-card p {
        color: var(--gray-light);
        margin-bottom: 15px;
        font-size: 0.9rem;
    }
    
    .tool-link {
        display: inline-block;
        padding: 10px 18px;
        background: linear-gradient(to right, var(--primary), var(--primary-dark));
        color: white;
        text-decoration: none;
        border-radius: var(--radius);
        font-weight: 600;
        transition: var(--transition);
        font-size: 0.9rem;
    }

    .tool-link.locked {
        background: rgba(255, 255, 255, 0.1);
        color: var(--gray);
        cursor: pointer;
        position: relative;
    }

    .tool-link.locked::after {
        content: '🔒';
        margin-left: 5px;
    }

    /* Image Comparison Slider - FIXED SOLUTION */
    .comparison-slider {
        position: relative;
        width: 100%;
        height: 200px;
        margin: 20px 0;
        border-radius: var(--radius);
        overflow: hidden;
        box-shadow: var(--shadow);
    }

    .comparison-slider-container {
        position: relative;
        width: 100%;
        height: 100%;
    }

    /* After image - full width fixed */
    .comparison-after {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        z-index: 1;
    }

    .comparison-after img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        display: block;
    }

    /* Before image - fixed position, only mask changes */
    .comparison-before {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%; /* Full width fixed */
        height: 100%;
        overflow: hidden;
        z-index: 2;
        /* Clip-path se sirf visible area control karenge */
        clip-path: polygon(0 0, 50% 0, 50% 100%, 0 100%);
    }

    /* Before image ko fixed rakhna hai */
    .comparison-before img {
        width: 100%; /* Container ke 100% width */
        height: 100%;
        object-fit: cover;
        display: block;
        /* Image fixed rahegi, move nahi hogi */
        position: static;
        transform: none;
    }

    /* Slider handle */
    .comparison-slider-handle {
        position: absolute;
        left: 50%;
        top: 0;
        bottom: 0;
        width: 4px;
        background: var(--primary);
        cursor: ew-resize;
        transform: translateX(-50%);
        z-index: 10;
        transition: all 0.2s ease;
    }

    .comparison-slider-handle:hover {
        width: 6px;
        background: var(--secondary);
    }

    .comparison-slider-handle::after {
        content: '';
        position: absolute;
        top: 50%;
        left: 50%;
        width: 40px;
        height: 40px;
        background: var(--primary);
        border: 3px solid white;
        border-radius: 50%;
        transform: translate(-50%, -50%);
        box-shadow: 0 2px 10px rgba(0,0,0,0.3);
    }

    .comparison-slider-handle::before {
        content: '↔';
        position: absolute;
        top: 50%;
        left: 50%;
        color: white;
        font-size: 16px;
        font-weight: bold;
        transform: translate(-50%, -50%);
        z-index: 11;
    }

    /* Labels for better UX */
    .comparison-label {
        position: absolute;
        top: 10px;
        padding: 5px 10px;
        background: rgba(0,0,0,0.7);
        color: white;
        font-size: 12px;
        font-weight: bold;
        border-radius: 4px;
        z-index: 9;
    }

    .comparison-label-before {
        left: 10px;
    }

    .comparison-label-after {
        right: 10px;
    }

    /* Template Grid */
    .templates-container {
        max-width: 1200px;
        margin: 0 auto;
        padding: 20px 15px;
    }
    
    .templates-heading {
        text-align: center;
        margin-bottom: 25px;
        font-size: 1.8rem;
        background: linear-gradient(to right, var(--primary), var(--secondary));
        -webkit-background-clip: text;
        background-clip: text;
        color: transparent;
        font-weight: 700;
    }
    
    .category-section {
        margin-bottom: 40px;
    }
    
    .category-title {
        font-size: 1.5rem;
        margin-bottom: 20px;
        padding-bottom: 10px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        color: var(--light);
    }
    
    .grid {
        display: grid;
        grid-template-columns: 1fr;
        gap: 20px;
        margin-top: 20px;
    }
    
    .card {
        background: rgba(255, 255, 255, 0.05);
        backdrop-filter: blur(10px);
        border: 1px solid rgba(255, 255, 255, 0.1);
        border-radius: var(--radius);
        overflow: hidden;
        display: flex;
        flex-direction: column;
        transition: var(--transition);
        box-shadow: var(--shadow);
        height: 100%;
        cursor: pointer;
    }
    
    .card:hover {
        transform: translateY(-5px);
        box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.3);
    }
    
    .card img {
        width: 100%;
        height: 180px;
        object-fit: cover;
        background: rgba(0, 0, 0, 0.2);
    }
    
    .card-content {
        padding: 15px;
        display: flex;
        flex-direction: column;
        flex-grow: 1;
    }
    
    .card h3 {
        font-size: 1.1rem;
        font-weight: 600;
        color: var(--light);
        margin-bottom: 10px;
    }
    
    .card .meta {
        font-size: 0.85rem;
        color: var(--gray);
        margin-bottom: 12px;
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
    }
    
    .card .meta span {
        background: rgba(255, 255, 255, 0.1);
        padding: 4px 8px;
        border-radius: 4px;
        font-size: 0.75rem;
    }
    
    .card .description {
        color: var(--gray-light);
        font-size: 0.9rem;
        margin-bottom: 15px;
        flex-grow: 1;
    }
    
    .card-actions {
        margin-top: auto;
        padding: 0 15px 15px;
    }
    
    .card button {
        width: 100%;
        padding: 10px;
        background: linear-gradient(to right, var(--primary), var(--primary-dark));
        color: white;
        border: none;
        border-radius: var(--radius);
        font-weight: 600;
        cursor: pointer;
        transition: var(--transition);
        font-size: 0.9rem;
    }

    .card button:hover {
        background: linear-gradient(to right, var(--primary-dark), var(--secondary));
    }

    .card button.locked {
        background: rgba(255, 255, 255, 0.1);
        color: var(--gray);
        cursor: pointer;
    }

    .card button.locked::after {
        content: ' 🔒';
    }
    
    /* Filter Bar */
    .filter-bar {
        display: flex;
        flex-direction: column;
        gap: 10px;
        background: rgba(255, 255, 255, 0.05);
        backdrop-filter: blur(10px);
        padding: 15px;
        border-radius: var(--radius);
        margin-bottom: 20px;
        box-shadow: var(--shadow);
        border: 1px solid rgba(255, 255, 255, 0.1);
    }

    .filter-bar select,
    .filter-bar input {
        padding: 10px;
        border: 1px solid rgba(255, 255, 255, 0.1);
        border-radius: var(--radius);
        background: rgba(0, 0, 0, 0.2);
        color: var(--light);
        font-size: 0.9rem;
    }

    .filter-bar button {
        padding: 10px;
        background: linear-gradient(to right, var(--primary), var(--primary-dark));
        color: white;
        border: none;
        border-radius: var(--radius);
        font-weight: 600;
        cursor: pointer;
    }

    .filter-bar a {
        color: var(--primary);
        text-decoration: none;
        font-size: 0.9rem;
        text-align: center;
    }
    
    /* No results message */
    .no-results {
        text-align: center;
        padding: 30px 20px;
        color: var(--gray);
        grid-column: 1 / -1;
        background: rgba(255, 255, 255, 0.05);
        border-radius: var(--radius);
    }

    /* Image Viewer Modal */
    .image-viewer-modal {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.95);
        display: flex;
        align-items: center;
        justify-content: center;
        z-index: 1000;
        opacity: 0;
        visibility: hidden;
        transition: var(--transition);
    }

    .image-viewer-modal.active {
        opacity: 1;
        visibility: visible;
    }

    .image-viewer-content {
        position: relative;
        max-width: 95%;
        max-height: 95%;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .image-viewer-content img {
        max-width: 100%;
        max-height: 100%;
        object-fit: contain;
        border-radius: var(--radius);
        box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
    }

    .image-viewer-close {
        position: absolute;
        top: 20px;
        right: 20px;
        background: rgba(255, 255, 255, 0.2);
        border: none;
        color: white;
        font-size: 1.5rem;
        width: 40px;
        height: 40px;
        border-radius: 50%;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        z-index: 1001;
    }

    .image-viewer-nav {
        position: absolute;
        top: 50%;
        transform: translateY(-50%);
        background: rgba(255, 255, 255, 0.2);
        border: none;
        color: white;
        font-size: 1.5rem;
        width: 50px;
        height: 50px;
        border-radius: 50%;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        transition: var(--transition);
        z-index: 1001;
    }

    .image-viewer-nav:hover {
        background: rgba(255, 255, 255, 0.3);
    }

    .image-viewer-prev {
        left: 20px;
    }

    .image-viewer-next {
        right: 20px;
    }

    .image-viewer-info {
        position: absolute;
        bottom: 20px;
        left: 0;
        right: 0;
        text-align: center;
        color: white;
        background: rgba(0, 0, 0, 0.7);
        padding: 15px;
        border-radius: var(--radius);
        margin: 0 20px;
        z-index: 1001;
    }

    /* Login Modal */
    .modal-overlay {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.8);
        backdrop-filter: blur(5px);
        display: flex;
        align-items: center;
        justify-content: center;
        z-index: 1000;
        opacity: 0;
        visibility: hidden;
        transition: var(--transition);
    }

    .modal-overlay.active {
        opacity: 1;
        visibility: visible;
    }

    .modal {
        background: rgba(255, 255, 255, 0.05);
        backdrop-filter: blur(20px);
        border: 1px solid rgba(255, 255, 255, 0.1);
        border-radius: var(--radius);
        padding: 25px;
        width: 90%;
        max-width: 400px;
        max-height: 90vh;
        overflow-y: auto;
        transform: translateY(20px);
        transition: var(--transition);
    }

    .modal-overlay.active .modal {
        transform: translateY(0);
    }

    .modal-close {
        position: absolute;
        top: 15px;
        right: 15px;
        background: none;
        border: none;
        color: var(--gray);
        font-size: 1.5rem;
        cursor: pointer;
    }

    .modal-tabs {
        display: flex;
        margin-bottom: 20px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    .modal-tab {
        padding: 10px 20px;
        background: none;
        border: none;
        color: var(--gray);
        cursor: pointer;
        font-weight: 500;
        transition: var(--transition);
    }

    .modal-tab.active {
        color: var(--primary);
        border-bottom: 2px solid var(--primary);
    }

    .modal-form {
        display: none;
    }

    .modal-form.active {
        display: block;
    }

    .modal-form .form-group {
        margin-bottom: 15px;
    }

    .modal-form label {
        display: block;
        margin-bottom: 5px;
        color: var(--gray-light);
        font-size: 0.9rem;
    }

    .modal-form input {
        width: 100%;
        padding: 10px;
        border: 1px solid rgba(255, 255, 255, 0.1);
        border-radius: var(--radius);
        background: rgba(0, 0, 0, 0.2);
        color: var(--light);
        font-size: 0.9rem;
    }

    .modal-form button {
        width: 100%;
        padding: 12px;
        background: linear-gradient(to right, var(--primary), var(--primary-dark));
        color: white;
        border: none;
        border-radius: var(--radius);
        font-weight: 600;
        cursor: pointer;
        margin-top: 10px;
    }

    .modal-error {
        background: rgba(239, 68, 68, 0.1);
        color: var(--error);
        padding: 10px;
        border-radius: var(--radius);
        margin-bottom: 15px;
        font-size: 0.9rem;
        text-align: center;
    }

    /* Tablet Styles */
    @media (min-width: 768px) {
        .container {
            padding: 0 20px;
        }

        .hero-section {
            padding: 50px 40px;
            margin: 20px auto;
        }

        .hero-title {
            font-size: 2.5rem;
        }

        .hero-subtitle {
            font-size: 1.1rem;
        }

        .hero-features {
            grid-template-columns: repeat(3, 1fr);
            gap: 25px;
        }

        .stats-grid {
            grid-template-columns: repeat(4, 1fr);
        }

        .tools-grid {
            grid-template-columns: repeat(2, 1fr);
            gap: 20px;
        }

        .grid {
            grid-template-columns: repeat(2, 1fr);
            gap: 25px;
        }

        .filter-bar {
            flex-direction: row;
            align-items: center;
        }

        .filter-bar select,
        .filter-bar input {
            flex: 1;
        }
        
        .comparison-slider {
            height: 250px;
        }
    }

    /* Desktop Styles */
    @media (min-width: 1024px) {
        .container {
            max-width: 1200px;
            padding: 0 30px;
        }

        .hero-section {
            padding: 60px 50px;
        }

        .hero-title {
            font-size: 3rem;
        }

        .hero-subtitle {
            font-size: 1.2rem;
        }

        .tools-grid {
            grid-template-columns: repeat(4, 1fr);
        }

        .grid {
            grid-template-columns: repeat(3, 1fr);
        }
        
        .comparison-slider {
            height: 300px;
        }
    }

    /* Animation */
    @keyframes fadeIn {
        from { opacity: 0; transform: translateY(10px); }
        to { opacity: 1; transform: translateY(0); }
    }

    .card, .tool-card, .feature-card {
        animation: fadeIn 0.5s ease-out;
    }