 /* All the CSS styles from the original code remain the same */
        :root {
            --primary-red: #e63946;
            --primary-dark-red: #d00000;
            --secondary-red: #ff686b;
            --light-red: #ffcccb;
            --text-color: #1f2937;
            --light-bg: #f8f1f1;
            --accent-color: #ffd166;
            --glass-bg: rgba(255, 255, 255, 0.7);
            --glass-border: rgba(255, 255, 255, 0.18);
            --ok: #10b981;
            --warn: #f59e0b;
            --ring: 0 0 0 .2rem rgba(230,57,70,.2);
            --muted: #6b7280;
            --bg: #f9fafb;
            --panel: #ffffff;
        }

        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        body {
            font-family: 'Inter', sans-serif;
            background-color: var(--bg);
            color: var(--text-color);
            line-height: 1.6;
            min-height: 100vh;
            display: flex;
            flex-direction: column;
        }

        /* Header Styles - Same as original */
        header {
            background: var(--glass-bg);
            backdrop-filter: blur(12px);
            -webkit-backdrop-filter: blur(12px);
            box-shadow: 0 4px 20px rgba(230, 57, 70, 0.1);
            border-bottom: 1px solid var(--glass-border);
            position: sticky;
            top: 0;
            z-index: 50;
            width: 100%;
        }

        .nav-container {
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 0.5rem 2rem;
            max-width: 100%;
            margin: 0 auto;
        }

        .logo {
            display: flex;
            align-items: center;
            font-size: 1.75rem;
            font-weight: 800;
            background: #f8f1f1;
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
        }

        .nav-menu {
            display: flex;
            align-items: center;
            gap: 0.5rem;
        }

        .nav-menu a, .nav-menu button {
            color: var(--text-color);
            font-weight: 600;
            font-size: 1rem;
            padding: 0.5rem 0.8rem;
            border-radius: 10px;
            transition: all 0.3s ease;
            white-space: nowrap;
            border: none;
            background: none;
            cursor: pointer;
            text-decoration: none;
        }

        .nav-menu a:hover, .nav-menu button:hover {
            background: linear-gradient(to right, var(--primary-red), var(--primary-dark-red));
            color: white;
            transform: translateY(-2px);
            box-shadow: 0 6px 15px rgba(230, 57, 70, 0.3);
        }

        .dropdown {
            position: relative;
        }

        .dropdown-menu {
            position: absolute;
            top: 100%;
            left: 0;
            background: #fffdfd;
            backdrop-filter: blur(16px);
            -webkit-backdrop-filter: blur(16px);
            border-radius: 12px;
            box-shadow: 0 10px 30px rgba(0,0,0,0.15);
            min-width: 210px;
            padding: 0.75rem 0;
            display: none;
            z-index: 10;
            border: 1px solid var(--glass-border);
            transform: translateY(10px);
            opacity: 0;
            transition: all 0.3s ease;
        }

        .dropdown:hover .dropdown-menu {
            display: block;
            opacity: 1;
            transform: translateY(0);
        }

        .dropdown-menu a {
            display: flex;
            align-items: center;
            padding: 0.75rem 1.25rem;
            color: var(--text-color);
            font-size: 0.9rem;
            border-radius: 0;
            font-weight: 500;
            text-decoration: none;
        }

        .dropdown-menu a:hover {
            background: rgba(230, 57, 70, 0.1);
            color: var(--primary-red);
            transform: none;
            box-shadow: none;
        }

        .dropdown-menu a i {
            width: 24px;
            text-align: center;
            margin-right: 0.75rem;
            color: var(--primary-red);
        }

        /* Grid Icon Button */
        .grid-icon-btn {
            background: #fffdfd;
            color: var(--primary-red);
            border: none;
            padding: 0.5rem;
            border-radius: 10px;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.3s;
            box-shadow: 0 4px 6px rgba(230, 57, 70, 0.2);
            display: flex;
            align-items: center;
            justify-content: center;
            width: 40px;
            height: 40px;
        }

        .grid-icon-btn:hover {
            transform: translateY(-2px);
            box-shadow: 0 6px 12px rgba(230, 57, 70, 0.3);
            background: var(--primary-red);
            color: white;
        }

        /* All Tools Dropdown */
        .all-tools-dropdown {
            display: none;
            position: absolute;
            top: 100%;
            right: 2rem;
            background: #fffdfd;
            backdrop-filter: blur(16px);
            -webkit-backdrop-filter: blur(16px);
            border-radius: 12px;
            box-shadow: 0 10px 30px rgba(0,0,0,0.15);
            padding: 2rem;
            z-index: 10;
            border: 1px solid var(--glass-border);
            opacity: 0;
            transition: all 0.3s ease;
            grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
            gap: 2rem;
            max-height: 70vh;
            overflow-y: auto;
            margin-top: 0.5rem;
            width: 90vw;
            max-width: 1200px;
        }

        .all-tools-dropdown.active {
            display: grid;
            opacity: 1;
        }

        .tool-category {
            margin-bottom: 1rem;
        }

        .tool-category h4 {
            font-weight: 700;
            color: var(--primary-red);
            margin-bottom: 1rem;
            padding-bottom: 0.4rem;
            border-bottom: 2px solid var(--light-red);
            font-size: 1.1rem;
        }

        .tool-category a {
            display: flex;
            align-items: center;
            padding: 0.7rem 0;
            color: var(--text-color);
            transition: all 0.3s;
            border-radius: 6px;
            text-decoration: none;
        }

        .tool-category a:hover {
            color: var(--primary-red);
            background: rgba(230, 57, 70, 0.1);
            transform: translateX(5px);
        }

        .tool-category a i {
            margin-right: 0.7rem;
            width: 20px;
            text-align: center;
            color: var(--primary-red);
            font-size: 1.1rem;
        }

        /* Mobile Hamburger Icon */
        .mobile-menu-btn {
            display: none;
            color: var(--primary-red);
            font-size: 1.5rem;
            cursor: pointer;
            background: var(--glass-bg);
            border-radius: 8px;
            padding: 0.5rem;
            backdrop-filter: blur(10px);
            -webkit-backdrop-filter: blur(10px);
            border: none;
        }

        /* Back to Top Button */
        .back-to-top {
            position: fixed;
            bottom: 30px;
            right: 30px;
            width: 50px;
            height: 50px;
            border-radius: 50%;
            background: var(--primary-red);
            color: white;
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            box-shadow: 0 4px 20px rgba(230, 57, 70, 0.3);
            transition: all 0.3s ease;
            z-index: 100;
            opacity: 0;
            visibility: hidden;
            transform: translateY(20px);
            border: none;
        }

        .back-to-top.visible {
            opacity: 1;
            visibility: visible;
            transform: translateY(0);
        }

        .back-to-top:hover {
            background: var(--primary-dark-red);
            transform: translateY(-5px);
        }

        /* Content Area Styles */
        .container {
            max-width: 95%;
            margin: 2rem auto;
            padding: 0 1rem;
            flex: 1;
        }

        .grid {
            display: grid;
            grid-template-columns: 380px 1fr;
            gap: 1.5rem;
        }

        .card {
            background: var(--panel);
            border-radius: 14px;
            box-shadow: 0 10px 30px rgba(0,0,0,.06);
            border: 1px solid #eee;
        }

        .card.pad {
            padding: 1.5rem;
        }

        .section-title {
            font-size: 1.8rem;
            font-weight: 800;
            color: var(--primary-red);
            text-align: center;
            margin: 0 0 1rem;
        }

        .subtle {
            color: var(--muted);
        }

        .card {
            background: var(--panel);
            border-radius: 12px;
            box-shadow: 0 8px 24px rgba(0,0,0,0.05);
            border: 1px solid #e5e7eb;
            padding: 1rem;
        }

        .section-title {
            font-size: 1.25rem;
            font-weight: 700;
            color: var(--primary-red);
            text-align: center;
            margin-bottom: 0.75rem;
        }

        .benefits-section {
            margin-top: 1rem;
            padding: 1rem;
            background: var(--glass-bg);
            border-radius: 12px;
            box-shadow: 0 4px 12px rgba(0,0,0,0.05);
            border: 2px solid var(--primary-red);
        }

        .benefits-section h3 {
            font-size: 1.2rem;
            font-weight: 800;
            color: var(--primary-red);
            margin-bottom: 0.75rem;
        }

        .benefits-section ul {
            list-style: none;
            padding-left: 0;
        }

        .benefits-section li {
            margin-bottom: 0.5rem;
            font-size: 0.85rem;
            display: flex;
            align-items: center;
        }

        .benefits-section li i {
            margin-right: 0.5rem;
            color: var(--primary-red);
        }

        .options h3 {
            font-size: 1.3rem;
            font-weight: 800;
            color: var(--primary-red);
            margin-bottom: 0.75rem;
            text-align: center;
        }

        .field {
            margin: 0.5rem 0;
        }

        .label {
            font-weight: 600;
            font-size: 0.85rem;
            margin-bottom: 0.3rem;
            color: var(--text-color);
        }

        select, input[type="text"], input[type="number"], input[type="color"], input[type="range"] {
            width: 100%;
            padding: 0.5rem;
            border: 1px solid #d1d5db;
            border-radius: 8px;
            font: inherit;
            background: #f9fafb;
            transition: border-color 0.2s ease;
            font-size: 0.85rem;
        }

        select:focus, input:focus {
            outline: none;
            border-color: var(--primary-red);
        }

        .tools-container {
            display: grid;
            grid-template-columns: repeat(2, 1fr);
            gap: 0.5rem;
        }

        .tool-btn {
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            padding: 0.5rem;
            background: #f9fafb;
            border: 1px solid #d1d5db;
            border-radius: 8px;
            cursor: pointer;
            transition: all 0.2s ease;
        }

        .tool-btn:hover, .tool-btn.active {
            border-color: var(--primary-red);
            background: #fef2f2;
            transform: scale(1.05);
        }

        .tool-btn i {
            font-size: 1rem;
            color: var(--primary-red);
        }

        .tool-btn span {
            font-size: 0.65rem;
            font-weight: 500;
            margin-top: 0.3rem;
        }

        .tool-options {
            margin-top: 0.75rem;
            padding: 0.5rem;
            background: #f9fafb;
            border-radius: 8px;
            display: none;
        }

        .tool-options.active {
            display: block;
        }

        .color-picker {
            display: flex;
            gap: 0.5rem;
            justify-content: center;
        }

        .color-option {
            width: 20px;
            height: 20px;
            border-radius: 50%;
            cursor: pointer;
            border: 2px solid transparent;
            transition: border-color 0.2s ease, transform 0.2s ease;
        }

        .color-option:hover, .color-option.active {
            border-color: #1f2937;
            transform: scale(1.1);
        }

        .drop {
            border: 2px dashed var(--light-red);
            border-radius: 12px;
            padding: 1rem;
            text-align: center;
            background: #fff5f5;
            cursor: pointer;
            transition: border-color 0.2s ease;
        }

        .drop:hover {
            border-color: var(--primary-red);
        }

        .drop .ico {
            font-size: 2rem;
            color: var(--primary-red);
        }

       /* PDF Preview Container - FIXED */
.preview-container {
    width: 100%;
    height: 600px;
    margin: 1rem 0;
    background: #f9f9f9;
    border: 2px dashed #d1d5db;
    border-radius: 12px;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden; /* Changed from auto to hidden */
    position: relative;
}

.preview-canvas {
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    position: relative;
    overflow: auto; /* Canvas ke andar scroll */
}

.preview-image {
    max-width: 100%;
    max-height: 100%;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    display: block;
    margin: 0 auto;
    object-fit: contain; /* Added for better image fitting */
}

/* Image Gallery - FIXED */
.image-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 10px;
    margin-top: 15px;
    max-height: 400px;
    overflow-y: auto;
    padding: 10px;
    background: #f9fafb;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
}

.image-item {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: transform 0.2s;
    cursor: pointer;
    background: white;
}

.image-item:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.image-item img {
    width: 100%;
    height: 120px;
    object-fit: cover;
    display: block;
}

.image-checkbox {
    position: absolute;
    top: 5px;
    left: 5px;
    width: 20px;
    height: 20px;
    z-index: 2;
    cursor: pointer;
}

.image-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0,0,0,0.7);
    color: white;
    padding: 5px;
    font-size: 0.7rem;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Grid Layout Fix */
.grid {
    display: grid;
    grid-template-columns: 380px 1fr;
    gap: 1.5rem;
    align-items: start; /* Added to prevent stretching */
}

/* Options Panel Fix */
.card.options.pad {
    position: sticky;
    top: 20px;
    max-height: calc(100vh - 100px);
    overflow-y: auto;
}

/* Responsive Design Improvements */
@media (max-width: 980px) {
    .grid {
        grid-template-columns: 1fr;
    }
    
    .card.options.pad {
        position: static;
        max-height: none;
    }
}

/* Better Scrollbars */
.preview-canvas::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

.preview-canvas::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.preview-canvas::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

.preview-canvas::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

        .placeholder {
            color: #6b7280;
            font-size: 1.1rem;
            text-align: center;
            padding: 2rem;
        }

        .page-navigation {
			display: absolute; !important;
            justify-content: space-between;
            align-items: center;
            margin-top: 1rem;
            padding: 0 1rem;
        }

        .page-navigation .btn {
            min-width: 44px;
            height: 44px;
            display: flex;
            align-items: center;
            justify-content: center;
            border: 1px solid #d1d5db;
            background: white;
            color: var(--text-color);
            transition: all 0.2s ease;
        }

        .page-navigation .btn:hover:not(:disabled) {
            background: var(--primary-red);
            color: white;
            border-color: var(--primary-red);
            transform: translateY(-1px);
        }

        .page-navigation .btn:disabled {
            opacity: 0.5;
            cursor: not-allowed;
            transform: none;
        }

        .page-info {
            font-weight: 600;
            color: var(--text-color);
            min-width: 100px;
            text-align: center;
        }

        .btn {
            border: none;
            border-radius: 999px;
            padding: 0.6rem 1rem;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.2s ease;
            font-size: 0.85rem;
            margin: 4px;
        }

        .primary {
            background: var(--primary-red);
            color: #fff;
        }

        .primary:hover {
            background: var(--primary-dark-red);
        }

        .ghost {
            background: #e5e7eb;
            color: var(--text-color);
        }

        .ghost:hover {
            background: #d1d5db;
        }

        .progress {
            display: none;
        }

        .progress.active {
            display: block;
        }

        .progress-ring {
            width: 80px;
            height: 80px;
            position: relative;
        }

        .progress-text {
            font-weight: 700;
            color: var(--primary-red);
            position: absolute;
            top: 100%;
            left: 25%;
            transform: translate(-50%, -50%);
			Display:none;
        }

        .zoom-controls {
            display: flex;
            align-items: center;
            gap: 0.5rem;
            margin-top: 1rem;
            justify-content: center;
        }

        .zoom-controls .btn {
            width: 36px;
            height: 36px;
            display: flex;
            align-items: center;
            justify-content: center;
            border: 1px solid #d1d5db;
            background: white;
            color: var(--text-color);
        }

        .zoom-controls .btn:hover {
            background: var(--primary-red);
            color: white;
            border-color: var(--primary-red);
        }

        #zoomLevel {
            min-width: 60px;
            text-align: center;
            font-weight: 600;
            color: var(--text-color);
        }

        .annotation-controls {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-top: 1rem;
            flex-wrap: wrap;
            gap: 1rem;
        }

        .success-window {
            position: fixed;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            background: white;
            border-radius: 12px;
            padding: 1rem;
            width: min(300px, 90vw);
            z-index: 1000;
            opacity: 0;
            visibility: hidden;
            transition: all 0.3s ease;
            box-shadow: 0 8px 24px rgba(0,0,0,0.1);
        }

        .success-window.active {
            opacity: 1;
            visibility: visible;
        }

        .close-btn {
            position: absolute;
            top: 0.5rem;
            right: 0.5rem;
            background: none;
            border: none;
            font-size: 1rem;
            color: var(--primary-red);
            cursor: pointer;
        }

        .fancy-loader {
            display: none;
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(255, 255, 255, 0.9);
            z-index: 9999;
            align-items: center;
            justify-content: center;
            flex-direction: column;
        }

        .fancy-loader.active {
            display: flex;
        }

        .loader-circle {
            width: 80px;
            height: 80px;
            border-radius: 50%;
            background: conic-gradient(var(--primary-red) 0%, transparent 0%);
            display: flex;
            align-items: center;
            justify-content: center;
            animation: rotate 1.5s linear infinite;
            box-shadow: 0 0 20px rgba(230, 57, 70, 0.3);
            position: relative;
        }

        .loader-circle::before {
            content: '';
            position: absolute;
            width: 70px;
            height: 70px;
            border-radius: 50%;
            background: white;
        }

        .loader-text {
            margin-top: 20px;
            font-weight: 600;
            color: var(--primary-red);
            font-size: 1.1rem;
        }
        @keyframes rotate {
            0% { background: conic-gradient(var(--primary-red) 0%, transparent 0%); }
            100% { background: conic-gradient(var(--primary-red) 100%, transparent 100%); }
        }

        .loader-dots {
            display: flex;
            margin-top: 15px;
        }

        .loader-dots span {
            width: 8px;
            height: 8px;
            border-radius: 50%;
            background: var(--primary-red);
            margin: 0 3px;
            animation: bounce 1.4s infinite ease-in-out both;
        }

        .loader-dots span:nth-child(1) { animation-delay: -0.32s; }
        .loader-dots span:nth-child(2) { animation-delay: -0.16s; }

        @keyframes bounce {
            0%, 80%, 100% { transform: scale(0); }
            40% { transform: scale(1.0); }
        }

        .features-section {
            grid-column: 1 / -1;
            margin: 40px 0;
        }

        .section-title {
            text-align: center;
            margin-bottom: 40px;
        }

        .section-title h2 {
            color: #d32f2f;
            font-size: 28px;
            margin-bottom: 15px;
            margin-top: -10px;
        }

        .section-title p {
            color: #666;
            max-width: 700px;
            margin: 0 auto;
            font-weight: normal;
        }

        .features-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
            gap: 15px;
            padding: 0 20px;
        }

        .feature-card {
            background-color: white;
            border-radius: 10px;
            padding: 20px;
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
            text-align: center;
            transition: transform 0.3s;
        }

        .feature-card:hover {
            transform: translateY(-5px);
        }

        .feature-card i {
            font-size: 40px;
            color: #d32f2f;
            margin-bottom: 15px;
        }

        .feature-card h3 {
            margin-bottom: 10px;
            color: #333;
            font-size: 18px;
        }

        .feature-card p {
            color: #666;
            line-height: 1.6;
            font-size: 14px;
            text-align: center;
        }

        .image-options {
            margin-top: 1rem;
        }

        .image-options .field {
            display: flex;
            align-items: center;
            gap: 1rem;
        }

        .image-options input[type="number"] {
            width: 100px;
        }

        .grid-download-options {
            margin-top: 1rem;
        }

        .grid-download-options .field {
            display: flex;
            align-items: center;
            gap: 0.5rem;
        }

        .grid-download-options input[type="number"] {
            width: 80px;
        }

        .benefits-section {
            margin-top: 2rem;
            padding: 1rem;
            background-color: #f9fafb;
            border-radius: 8px;
        }

        .benefits-section h3 {
            font-size: 1.2rem;
            color: var(--primary-red);
            margin-bottom: 1rem;
        }

        .benefits-section ul {
            list-style: none;
        }

        .benefits-section li {
            margin-bottom: 0.5rem;
            display: flex;
            align-items: center;
        }

        .benefits-section li i {
            margin-right: 0.5rem;
            color: var(--primary-red);
        }

        /* Enhanced Annotation Options */
        .options-grid {
            display: grid;
            grid-template-columns: 1fr;
            gap: 1rem;
        }

        .option-group {
            border: 1px solid #e5e7eb;
            border-radius: 10px;
            padding: 1rem;
            background: #f9fafb;
            transition: all 0.3s ease;
        }

        .option-group:hover {
            box-shadow: 0 4px 12px rgba(0,0,0,0.05);
            border-color: var(--light-red);
        }

        .option-group-header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            margin-bottom: 0.75rem;
            cursor: pointer;
        }

        .option-group-title {
            font-weight: 700;
            font-size: 0.95rem;
            color: var(--primary-red);
            display: flex;
            align-items: center;
            gap: 0.5rem;
        }

        .option-group-content {
            display: block;
        }

        .option-group.collapsed .option-group-content {
            display: none;
        }

        .option-group-toggle {
            transition: transform 0.3s ease;
            color: var(--primary-red);
        }

        .option-group.collapsed .option-group-toggle {
            transform: rotate(-90deg);
        }

        .option-description {
            font-size: 0.75rem;
            color: var(--muted);
            margin-top: 0.5rem;
            line-height: 1.4;
        }

        .option-icon {
            width: 18px;
            height: 18px;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .layout-options {
            display: grid;
            grid-template-columns: repeat(2, 1fr);
            gap: 0.5rem;
            margin-top: 0.5rem;
        }

        .layout-option {
            display: flex;
            flex-direction: column;
            align-items: center;
            padding: 0.75rem 0.5rem;
            border: 1px solid #d1d5db;
            border-radius: 8px;
            cursor: pointer;
            transition: all 0.2s ease;
            background: white;
        }

        .layout-option:hover {
            border-color: var(--primary-red);
            background: #fef2f2;
        }

        .layout-option.active {
            border-color: var(--primary-red);
            background: #fee2e2;
            box-shadow: 0 2px 6px rgba(230, 57, 70, 0.2);
        }

        .layout-icon {
            font-size: 1.5rem;
            margin-bottom: 0.5rem;
            color: var(--primary-red);
        }

        .layout-label {
            font-size: 0.75rem;
            font-weight: 600;
            text-align: center;
        }

        .quality-slider {
            display: flex;
            align-items: center;
            gap: 0.75rem;
            margin-top: 0.5rem;
        }

        .quality-slider input[type="range"] {
            flex: 1;
        }

        .quality-value {
            font-weight: 700;
            min-width: 40px;
            text-align: center;
            color: var(--primary-red);
        }

        .file-name-preview {
            font-size: 0.8rem;
            margin-top: 0.5rem;
            padding: 0.5rem;
            background: white;
            border-radius: 6px;
            border: 1px solid #d1d5db;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
            font-weight: 600;
            color: var(--primary-red);
        }

        .option-subgroup {
            margin-top: 0.75rem;
            padding: 0.75rem;
            background: white;
            border-radius: 6px;
            border: 1px solid #e5e7eb;
        }

        .option-subgroup-title {
            font-weight: 600;
            font-size: 0.85rem;
            margin-bottom: 0.5rem;
            color: var(--text-color);
        }

        /* Image extraction specific styles */
        .extraction-status {
            margin-top: 1rem;
            padding: 1rem;
            background: #f0f9ff;
            border-radius: 8px;
            border: 1px solid #bae6fd;
        }

        .extraction-status h4 {
            font-weight: 700;
            color: #0369a1;
            margin-bottom: 0.5rem;
        }

        .extraction-results {
            margin-top: 1rem;
            padding: 1rem;
            background: #fef2f2;
            border-radius: 8px;
            border: 1px solid #fecaca;
        }

        .extraction-results h4 {
            font-weight: 700;
            color: #dc2626;
            margin-bottom: 0.5rem;
        }

        .image-list {
            list-style-type: none;
            padding-left: 0;
        }

        .image-list li {
            margin-bottom: 0.5rem;
            display: flex;
            align-items: center;
        }

        .image-list li i {
            margin-right: 0.5rem;
            color: #dc2626;
        }

        .extraction-actions {
            display: flex;
            flex-direction: column;
            gap: 0.5rem;
            margin-top: 1rem;
        }

        .extraction-actions .btn {
            width: 100%;
        }

        /* Image gallery styles */
        .image-gallery {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
            gap: 10px;
            margin-top: 15px;
            max-height: 400px;
            overflow-y: auto;
            padding: 10px;
            background: #f9fafb;
            border-radius: 8px;
        }

        .image-item {
            position: relative;
            border-radius: 8px;
            overflow: hidden;
            box-shadow: 0 2px 4px rgba(0,0,0,0.1);
            transition: transform 0.2s;
            cursor: pointer;
        }

        .image-item:hover {
            transform: scale(1.05);
        }

        .image-item img {
            width: 100%;
            height: 120px;
            object-fit: cover;
            display: block;
        }

        .image-checkbox {
            position: absolute;
            top: 5px;
            left: 5px;
            width: 20px;
            height: 20px;
            z-index: 2;
        }

        .image-info {
            position: absolute;
            bottom: 0;
            left: 0;
            right: 0;
            background: rgba(0,0,0,0.7);
            color: white;
            padding: 5px;
            font-size: 0.7rem;
            text-align: center;
        }

        /* Enhanced Footer */
        footer {
            background: linear-gradient(135deg, var(--primary-dark-red), var(--primary-red));
            color: white;
            padding: 3rem 0 0;
            margin-top: auto;
        }
        
        .footer-content {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
            gap: 2.5rem;
            max-width: 100%;
            margin: 0 auto;
            padding: 0 2rem 2rem;
        }
        
        .footer-logo {
            display: flex;
            align-items: center;
            font-size: 1.8rem;
            font-weight: 800;
            color: white;
            margin-bottom: 1rem;
            background: linear-gradient(to right, white, #ffd166);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
        }
        
        .footer-section h3 {
            font-size: 1.2rem;
            font-weight: 700;
            margin-bottom: 1.5rem;
            position: relative;
            padding-bottom: 0.5rem;
        }
        
        .footer-section h3:after {
            content: '';
            position: absolute;
            bottom: 0;
            left: 0;
            width: 40px;
            height: 3px;
            background: var(--accent-color);
            border-radius: 2px;
        }
        
        .footer-links {
            list-style: none;
        }
        
        .footer-links li {
            margin-bottom: 0.8rem;
        }
        
        .footer-links a {
            color: rgba(255, 255, 255, 0.85);
            transition: all 0.3s;
            display: inline-block;
            text-decoration: none;
            font-size: 0.95rem;
        }
        
        .footer-links a:hover {
            color: white;
            transform: translateX(5px);
        }
        
        .social-links {
            display: flex;
            gap: 1rem;
            margin-top: 1.5rem;
            flex-wrap: wrap;
        }
        
        .social-links a {
            display: flex;
            align-items: center;
            justify-content: center;
            width: 42px;
            height: 42px;
            background: rgba(255, 255, 255, 0.1);
            border-radius: 50%;
            color: white;
            transition: all 0.3s;
            text-decoration: none;
            font-size: 1.1rem;
        }
        
        .social-links a:hover {
            background: var(--accent-color);
            transform: translateY(-3px);
            box-shadow: 0 5px 15px rgba(0,0,0,0.2);
        }
        
        .copyright {
            text-align: center;
            padding: 1.5rem;
            border-top: 1px solid rgba(255, 255, 255, 0.15);
            margin-top: 2rem;
            color: rgba(255, 255, 255, 0.7);
            font-size: 0.9rem;
        }
        
        .footer-newsletter {
            margin-top: 1rem;
        }
        
        .footer-newsletter p {
            margin-bottom: 1rem;
            color: rgba(255, 255, 255, 0.85);
            font-size: 0.9rem;
        }
        
        .newsletter-form {
            display: flex;
            gap: 0.5rem;
        }
        
        .newsletter-form input {
            flex: 1;
            padding: 0.6rem 0.8rem;
            border: none;
            border-radius: 6px;
            font-size: 0.9rem;
        }
        
        .newsletter-form button {
            background: var(--accent-color);
            color: var(--text-color);
            border: none;
            border-radius: 6px;
            padding: 0.6rem 1rem;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.3s;
        }
        
        .newsletter-form button:hover {
            background: #ffc043;
            transform: translateY(-2px);
        }
		/* Remove left side scroll */
			.options-grid {
				max-height: none !important;
				overflow: visible !important;
			}

			.option-group-content {
				max-height: none !important;
				overflow: visible !important;
			}

			/* Fix preview container */
			.preview-container {
				height: 600px;
				border: 2px dashed #e2e8f0;
				border-radius: 10px;
				display: flex;
				align-items: center;
				justify-content: center;
				background: #f8fafc;
				margin-bottom: 20px;
			}

			.preview-container.loaded {
				border-color: #10b981;
				background: #f0fdf4;
			}

			.pdf-canvas-container {
				width: 100%;
				height: 100%;
				display: flex;
				align-items: center;
				justify-content: center;
				overflow: auto;
			}

			#pdfCanvas {
				max-width: 100%;
				max-height: 100%;
				box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
			}

			.placeholder {
				text-align: center;
				color: #6b7280;
				padding: 2rem;
			}

			.placeholder i {
				font-size: 3rem;
				margin-bottom: 1rem;
				color: #9ca3af;
			}

			/* Remove any max-height restrictions from left side */
			.card.options {
				max-height: none !important;
				overflow: visible !important;
			}

			/* Ensure grid layout works properly */
			.grid {
				display: grid;
				grid-template-columns: 400px 1fr;
				gap: 2rem;
				align-items: start;
			}

			/* Responsive design */
			@media (max-width: 1024px) {
				.grid {
					grid-template-columns: 1fr;
				}
			}

			/* Zoom and navigation controls */
			.zoom-controls {
				display: flex;
				align-items: center;
				gap: 0.5rem;
				margin-bottom: 1rem;
			}

			.page-navigation {
				display: flex;
				align-items: center;
				gap: 0.5rem;
				margin-bottom: 1rem;
			}

			.control-btn {
				padding: 0.5rem 1rem;
				border: 1px solid #d1d5db;
				border-radius: 6px;
				background: white;
				cursor: pointer;
				transition: all 0.2s;
			}

			.control-btn:hover {
				background: #f3f4f6;
			}

			.control-btn:disabled {
				opacity: 0.5;
				cursor: not-allowed;
			}

			/* Image gallery improvements */
			.image-gallery {
				display: grid;
				grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
				gap: 1rem;
				margin-top: 1rem;
			}

			.image-item {
				border: 1px solid #e5e7eb;
				border-radius: 8px;
				padding: 0.5rem;
				background: white;
				transition: all 0.2s;
			}

			.image-item:hover {
				border-color: #3b82f6;
				box-shadow: 0 2px 8px rgba(59, 130, 246, 0.1);
			}

			.image-checkbox {
				margin-bottom: 0.5rem;
			}

			.image-placeholder {
				width: 100%;
				height: 120px;
				background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
				display: flex;
				flex-direction: column;
				align-items: center;
				justify-content: center;
				color: white;
				border-radius: 6px;
				margin-bottom: 0.5rem;
			}

			.image-info {
				font-size: 0.8rem;
				color: #374151;
			}
        /* Benefits Section Below Preview */
        .preview-benefits {
            margin-top: 2rem;
            padding: 1.5rem;
            background: linear-gradient(135deg, #f8f1f1, #fff5f5);
            border-radius: 12px;
            
        }

        .preview-benefits h3 {
            font-size: 1.3rem;
            font-weight: 700;
            color: var(--primary-red);
            margin-bottom: 1rem;
            text-align: center;
        }

        .benefits-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
            gap: 1rem;
        }

        .benefit-item {
            display: flex;
            align-items: center;
            padding: 0.75rem;
            background: white;
            border-radius: 8px;
            box-shadow: 0 2px 8px rgba(0,0,0,0.05);
        }

        .benefit-item i {
            font-size: 1.5rem;
            color: var(--primary-red);
            margin-right: 0.75rem;
            width: 40px;
            text-align: center;
        }

        .benefit-item span {
            font-weight: 600;
            font-size: 0.9rem;
            color: var(--text-color);
        }

        /* Enhanced Main Features */
        .main-features {
            margin-top: 1.5rem;
        }

        .main-features h3 {
            font-size: 1.4rem;
            font-weight: 800;
            color: var(--primary-red);
            margin-bottom: 1rem;
            text-align: center;
        }

        .feature-list {
            list-style: none;
        }

        .feature-list li {
            display: flex;
            align-items: center;
            padding: 0.75rem 0.5rem;
            margin-bottom: 0.5rem;
            background: white;
            border-radius: 8px;
            border: 1px solid #e5e7eb;
        }

        .feature-list li i {
            font-size: 1.2rem;
            color: var(--primary-red);
            margin-right: 0.75rem;
            width: 24px;
            text-align: center;
        }

        .feature-list li span {
            font-weight: 600;
            font-size: 0.85rem;
        }

        /* Canvas Container */
        #pdfCanvas {
            max-width: 100%;
            max-height: 100%;
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
            cursor: crosshair;
        }

        /* PDF Canvas Container */
        .pdf-canvas-container {
            position: relative;
            width: 100%;
            height: 100%;
            display: flex;
            justify-content: center;
            align-items: center;
            overflow: auto;
        }

        /* Responsive Design */
        @media (max-width: 1280px) {
            .nav-menu {
                gap: 0.3rem;
            }

            .nav-menu a, .nav-menu button {
                font-size: 0.95rem;
                padding: 0.4rem 0.6rem;
            }
        }

        @media (max-width: 1024px) {
            .nav-menu a, .nav-menu button {
                font-size: 0.9rem;
                padding: 0.4rem 0.5rem;
            }
            
            .preview-container {
                height: 500px;
				display: none !important;	
            }
            
            .footer-content {
                grid-template-columns: repeat(2, 1fr);
                text-align: center;
            }
            
            .footer-section {
                text-align: center;
            }
            .footer-section h3:after {
                left: 50%;
                transform: translateX(-50%);
            }
            .social-links {
                justify-content: center;
            }
        }
        
        @media (max-width: 980px) {
            .grid {
                grid-template-columns: 1fr;
            }
        }

        @media (max-width: 900px) {
            .mobile-menu-btn {
                display: flex;
                align-items: center;
                justify-content: center;
            }
            
            .nav-menu {
                display: none;
                position: absolute;
                top: 100%;
                left: 0;
                right: 0;
                background: var(--glass-bg);
                backdrop-filter: blur(16px);
                -webkit-backdrop-filter: blur(16px);
                flex-direction: column;
                padding: 1rem;
                box-shadow: 0 10px 30px rgba(0,0,0,0.1);
                border: 1px solid var(--glass-border);
                border-top: none;
                z-index: 100;
            }

            .nav-menu.active {
                display: flex;
            }
            
            .dropdown-menu {
                position: static;
                box-shadow: none;
                background: rgba(255, 255, 255, 0.3);
                margin: 0.5rem 0;
                width: 100%;
                display: none;
            }
            
            .dropdown button {
                width: 100%;
                text-align: left;
                display: flex;
                justify-content: space-between;
                align-items: center;
            }
            
            .dropdown.active button::after {
                transform: rotate(-90deg);
            }

            .dropdown-menu {
                position: static;
                box-shadow: none;
                background: rgba(255, 255, 255, 0.3);
                margin: 0.5rem 0;
                width: 100%;
                display: none;
            }

            .dropdown-menu.show {
                display: block;
            }
            
            .all-tools-dropdown {
                width: 95vw;
                padding: 1.5rem;
                gap: 1.5rem;
                right: 1rem;
            }
            
            .back-to-top {
                bottom: 20px;
                right: 20px;
                width: 45px;
                height: 45px;
            }
        }

        @media (max-width: 768px) {
            .preview-container {
                height: 400px;
                padding: 10px;
                max-height: 60vh;
                overflow: auto;
            }
            
            .preview-canvas {
                min-height: 250px;
                display: flex;
                align-items: center;
                justify-content: center;
                padding: 0px;
            }
            
            .preview-image {
                max-width: 100%;
                height: auto;
            }
            
            .page-navigation {
                flex-wrap: wrap;
                justify-content: center;
                gap: 10px;
            }
            
            .page-navigation .btn {
                min-width: 40px;
                height: 40px;
            }
            
            .actions {
                flex-direction: column;
                gap: 10px;
            }
            
            .actions .btn {
                width: 100%;
            }
            
            .zoom-controls {
                margin-top: 0.5rem;
				display: none !important;
            }
            
            .footer-content {
                grid-template-columns: 1fr;
                text-align: center;
                gap: 1.5rem;
                padding: 0 1rem 2rem;
            }
            
            .footer-section {
                text-align: center;
            }
            
            .footer-logo {
                justify-content: center;
            }
            
            .footer-links {
                display: block;
            }
            
            .footer-links li {
                text-align: center;
            }
            
            .newsletter-form {
                flex-direction: column;
            }
            
            .benefits-grid {
                grid-template-columns: 1fr;
            }
        }

        @media (max-width: 600px) {
            .nav-container {
                padding: 0.7rem 1rem;
            }

            .page-navigation{
			display:none;
			}
            .logo {
                font-size: 1.5rem;
            }
            
            .all-tools-dropdown {
                grid-template-columns: 1fr;
                padding: 1rem;
                gap: 1rem;
            }
            
            .tool-category h4 {
                font-size: 1rem;
            }
            
            .tool-category a {
                font-size: 0.9rem;
                padding: 0.5rem 0;
            }
            
            .back-to-top {
                bottom: 15px;
                right: 15px;
                width: 40px;
                height: 40px;
            }
        }