        :root {
            --primary: #4361ee;
            --primary-dark: #3a56d4;
            --secondary: #3f37c9;
            --success: #4cc9f0;
            --danger: #f72585;
            --warning: #f8961e;
            --info: #4895ef;
            --light: #f8f9fa;
            --dark: #212529;
            --gray: #6c757d;
            --light-gray: #e9ecef;
            --white: #ffffff;
            --black: #000000;
            --shadow-sm: 0 1px 3px rgba(0,0,0,0.1);
            --shadow-md: 0 4px 6px rgba(0,0,0,0.1);
            --shadow-lg: 0 10px 15px rgba(0,0,0,0.1);
        }

        * {
            box-sizing: border-box;
            margin: 0;
            padding: 0;
        }

        body {
            font-family: 'Inter', sans-serif;
            line-height: 1.6;
            color: var(--dark);
            background-color: #f5f7fa;
        }

        .container {
            max-width: 1200px;
            margin: 0 auto;
            padding: 0 20px;
        }

        .headerp {
            text-align: center;
            margin: 1rem 0;
            padding: 1rem 1rem;
            background: linear-gradient(135deg, #4361ee 0%, #3f37c9 100%);
            color: white;
            border-radius: 12px;
            box-shadow: var(--shadow-lg);
        }

        .headerp h1 {
            font-size: 1.5rem;
            margin-bottom: 0.5rem;
            font-weight: 700;
        }

        .headerp p {
            font-size: 1rem;
            opacity: 0.9;
            max-width: 700px;
            margin: 0 auto;
        }

        .tool-container {
            display: grid;
            grid-template-columns: 1fr;
            gap: 25px;
            margin-bottom: 40px;
        }

        @media (min-width: 992px) {
            .tool-container {
                grid-template-columns: 1fr 1fr;
                align-items: start;
            }
        }

        .panel {
            background-color: var(--white);
            border-radius: 12px;
            box-shadow: var(--shadow-md);
            overflow: hidden;
            transition: transform 0.3s ease, box-shadow 0.3s ease;
            display: flex;
            flex-direction: column;
            height: 100%;
        }

        .panel:hover {
            transform: translateY(-5px);
            box-shadow: 0 15px 30px rgba(0,0,0,0.1);
        }

        .panel-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 18px 25px;
            background-color: var(--primary);
            color: white;
        }

        .panel-title {
            display: flex;
            align-items: center;
            font-weight: 600;
            font-size: 1.1rem;
        }

        .panel-title i {
            margin-right: 12px;
            font-size: 1.2rem;
        }

        .btn {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            padding: 10px 18px;
            border-radius: 8px;
            font-weight: 500;
            cursor: pointer;
            transition: all 0.2s ease;
            border: none;
            font-size: 0.95rem;
        }

        .btn i {
            margin-right: 8px;
        }

        .btn-primary {
            background-color: white;
            color: var(--primary);
            font-weight: 600;
        }

        .btn-primary:hover {
            background-color: rgba(255,255,255,0.9);
        }

        .btn-secondary {
            background-color: rgba(255,255,255,0.1);
            color: white;
            border: 1px solid rgba(255,255,255,0.3);
        }

        .btn-secondary:hover {
            background-color: rgba(255,255,255,0.2);
        }

        .btn-success {
            background-color: var(--success);
            color: white;
        }

        .btn-success:hover {
            background-color: #3ab7d8;
        }

        .upload-section {
            padding: 40px 25px;
            text-align: center;
        }

        .upload-option {
            border: 2px dashed rgba(67, 97, 238, 0.3);
            border-radius: 10px;
            padding: 40px 30px;
            cursor: pointer;
            transition: all 0.2s ease;
            position: relative;
            background-color: rgba(67, 97, 238, 0.03);
        }

        .upload-option:hover {
            border-color: var(--primary);
            background-color: rgba(67, 97, 238, 0.08);
        }

        .upload-icon {
            font-size: 3rem;
            color: var(--primary);
            margin-bottom: 20px;
            opacity: 0.8;
        }

        .upload-text {
            font-size: 1.2rem;
            font-weight: 600;
            margin-bottom: 8px;
            color: var(--dark);
        }

        .upload-subtext {
            font-size: 0.95rem;
            color: var(--gray);
            margin-bottom: 20px;
        }

        #fileInput {
            position: absolute;
            width: 100%;
            height: 100%;
            top: 0;
            left: 0;
            opacity: 0;
            cursor: pointer;
        }

        .file-info-container {
            padding: 25px;
            border-top: 1px solid var(--light-gray);
            display: none;
        }

        .file-preview {
            display: flex;
            align-items: center;
            margin-bottom: 20px;
        }

        .file-preview-icon {
            width: 60px;
            height: 60px;
            display: flex;
            align-items: center;
            justify-content: center;
            background-color: rgba(67, 97, 238, 0.1);
            border-radius: 8px;
            margin-right: 15px;
            color: var(--primary);
            font-size: 1.5rem;
        }

        .file-preview-details {
            flex: 1;
        }

        .file-preview-name {
            font-weight: 600;
            margin-bottom: 5px;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }

        .file-preview-meta {
            display: flex;
            gap: 15px;
            font-size: 0.9rem;
            color: var(--gray);
        }

        .file-preview-meta span {
            display: flex;
            align-items: center;
        }

        .file-preview-meta i {
            margin-right: 5px;
            font-size: 0.9rem;
        }

        .options-container {
            padding: 0 25px 25px;
        }

        .option-group {
            margin-bottom: 25px;
        }

        .option-group-title {
            display: flex;
            align-items: center;
            margin-bottom: 15px;
            font-weight: 600;
            color: var(--dark);
        }

        .option-group-title i {
            margin-right: 10px;
            color: var(--primary);
        }

        .quality-slider {
            margin-top: 20px;
        }

        .quality-slider label {
            display: block;
            font-weight: 500;
            margin-bottom: 10px;
        }

        .slider-container {
            display: flex;
            align-items: center;
            gap: 15px;
        }

        .slider {
            flex: 1;
            -webkit-appearance: none;
            height: 8px;
            border-radius: 4px;
            background: var(--light-gray);
            outline: none;
        }

        .slider::-webkit-slider-thumb {
            -webkit-appearance: none;
            appearance: none;
            width: 20px;
            height: 20px;
            border-radius: 50%;
            background: var(--primary);
            cursor: pointer;
        }

        .slider-value {
            min-width: 40px;
            text-align: center;
            font-weight: 600;
        }

        .page-range-container {
            margin-top: 20px;
        }

        .page-range-input {
            margin-bottom: 15px;
        }

        .page-range-input label {
            display: block;
            font-weight: 500;
            margin-bottom: 8px;
        }

        .page-range-input input {
            padding: 10px 15px;
            border: 1px solid var(--light-gray);
            border-radius: 6px;
            width: 100%;
            max-width: 400px;
        }

        .page-range-example {
            font-size: 0.85rem;
            color: var(--gray);
            margin-top: 5px;
        }

        .checkbox-option {
            display: flex;
            align-items: center;
            margin-bottom: 12px;
        }

        .checkbox-option input {
            margin-right: 10px;
        }

        .controls {
            display: flex;
            justify-content: space-between;
            padding: 0 25px 25px;
            gap: 15px;
        }

        .controls .btn {
            flex: 1;
            padding: 12px;
            font-size: 1rem;
            font-weight: 600;
        }

        .btn-reset {
            background-color: var(--light-gray);
            color: var(--dark);
        }

        .btn-reset:hover {
            background-color: #e2e6ea;
        }

        .btn-convert {
            background-color: var(--primary);
            color: white;
        }

        .btn-convert:hover {
            background-color: var(--primary-dark);
        }

        .btn-convert:disabled {
            background-color: var(--gray);
            cursor: not-allowed;
            opacity: 0.7;
        }

        /* Results Section */
        .results-container {
            background-color: var(--white);
            border-radius: 12px;
            box-shadow: var(--shadow-md);
            margin-bottom: 40px;
            overflow: hidden;
            display: none;
        }

        .results-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 15px 25px;
            background-color: var(--primary);
            color: white;
        }

        .results-title {
            display: flex;
            align-items: center;
            font-weight: 600;
            font-size: 1.1rem;
        }

        .results-title i {
            margin-right: 10px;
            font-size: 1.1rem;
        }

        .results-count {
            background-color: rgba(255,255,255,0.2);
            padding: 4px 10px;
            border-radius: 20px;
            font-size: 0.85rem;
        }

        .results-content {
            padding: 25px;
        }

        .results-summary {
            display: flex;
            align-items: center;
            margin-bottom: 25px;
            padding-bottom: 20px;
            border-bottom: 1px solid var(--light-gray);
        }

        .results-summary-icon {
            width: 60px;
            height: 60px;
            display: flex;
            align-items: center;
            justify-content: center;
            background-color: rgba(67, 97, 238, 0.1);
            border-radius: 50%;
            margin-right: 20px;
            color: var(--primary);
            font-size: 1.8rem;
        }

        .results-summary-text h3 {
            font-size: 1.2rem;
            margin-bottom: 5px;
            color: var(--dark);
        }

        .results-summary-text p {
            color: var(--gray);
        }

        .results-grid {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
            gap: 20px;
        }

        .result-item {
            border: 1px solid var(--light-gray);
            border-radius: 10px;
            overflow: hidden;
            transition: transform 0.3s ease, box-shadow 0.3s ease;
        }

        .result-item:hover {
            transform: translateY(-5px);
            box-shadow: var(--shadow-sm);
        }

        .result-item-header {
            padding: 15px;
            background-color: var(--light);
            border-bottom: 1px solid var(--light-gray);
            display: flex;
            align-items: center;
        }

        .result-item-icon {
            width: 40px;
            height: 40px;
            display: flex;
            align-items: center;
            justify-content: center;
            background-color: rgba(67, 97, 238, 0.1);
            border-radius: 6px;
            margin-right: 12px;
            color: var(--primary);
            font-size: 1.2rem;
        }

        .result-item-title {
            font-weight: 600;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }

        .result-item-body {
            padding: 15px;
        }

        .result-item-image {
            width: 100%;
            height: auto;
            border-radius: 6px;
            margin-bottom: 15px;
            background-color: #f5f5f5;
        }

        .result-item-meta {
            display: flex;
            justify-content: space-between;
            margin-bottom: 15px;
            font-size: 0.9rem;
        }

        .result-item-page {
            color: var(--primary);
            font-weight: 500;
        }

        .result-item-size {
            color: var(--gray);
        }

        .result-item-actions {
            display: flex;
            gap: 10px;
        }

        .result-item-btn {
            flex: 1;
            padding: 8px 12px;
            border-radius: 6px;
            font-size: 0.9rem;
            font-weight: 500;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: all 0.2s ease;
        }

        .download-btn {
            background-color: var(--primary);
            color: white;
            border: none;
        }

        .download-btn:hover {
            background-color: var(--primary-dark);
        }

        .preview-btn {
            background-color: white;
            color: var(--primary);
            border: 1px solid var(--primary);
        }

        .preview-btn:hover {
            background-color: rgba(67, 97, 238, 0.1);
        }

        .download-all-btn {
            display: block;
            width: 50%;
            padding: 12px;
            margin: 20px auto 0;
            text-align: center;
            background-color: var(--success);
            color: white;
            border-radius: 8px;
            font-weight: 600;
            transition: all 0.2s ease;
        }

        .download-all-btn:hover {
            background-color: #3ab7d8;
        }

        .loading {
            display: none;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            padding: 40px;
            text-align: center;
        }

        .spinner {
            width: 50px;
            height: 50px;
            border: 5px solid rgba(67, 97, 238, 0.1);
            border-left-color: var(--primary);
            border-radius: 50%;
            animation: spin 1s linear infinite;
            margin-bottom: 20px;
        }

        @keyframes spin {
            to { transform: rotate(360deg); }
        }

        .loading-text {
            font-weight: 500;
            margin-bottom: 15px;
            color: var(--dark);
        }

        .progress-bar {
            width: 100%;
            height: 8px;
            background-color: var(--light-gray);
            border-radius: 4px;
            margin-top: 15px;
            overflow: hidden;
        }

        .progress {
            height: 100%;
            background: linear-gradient(90deg, #4361ee 0%, #4cc9f0 100%);
            width: 0%;
            transition: width 0.3s ease;
        }

        .toast-container {
            position: fixed;
            top: 20px;
            right: 20px;
            z-index: 1000;
            display: flex;
            flex-direction: column;
            gap: 10px;
        }

        .toast {
            padding: 15px 25px;
            border-radius: 8px;
            background-color: var(--dark);
            color: var(--white);
            box-shadow: var(--shadow-lg);
            display: flex;
            align-items: center;
            transform: translateX(150%);
            transition: transform 0.3s ease;
            max-width: 350px;
        }

        .toast.show {
            transform: translateX(0);
        }

        .toast.success {
            background-color: #2ecc71;
        }

        .toast.error {
            background-color: var(--danger);
        }

        .toast.warning {
            background-color: var(--warning);
        }

        .toast.info {
            background-color: var(--info);
        }

        .toast i {
            margin-right: 12px;
            font-size: 1.2rem;
        }

        .toast-close {
            background: none;
            border: none;
            color: inherit;
            cursor: pointer;
            margin-left: 20px;
            font-size: 1.1rem;
            opacity: 0.7;
            transition: opacity 0.2s ease;
        }

        .toast-close:hover {
            opacity: 1;
        }

        /* Drag and drop styling */
        .upload-option.drag-over {
            border-color: var(--primary);
            background-color: rgba(67, 97, 238, 0.1);
            box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.2);
        }

        @media (max-width: 768px) {
            .headerp h1 {
                font-size: 1.8rem;
            }
            
            .headerp p {
                font-size: 1rem;
            }
            
            .panel-header {
                padding: 15px 20px;
            }
            
            .upload-section {
                padding: 30px 20px;
            }
            
            .upload-option {
                padding: 30px 20px;
            }
            
            .results-grid {
                grid-template-columns: 1fr;
            }
            
            .toast {
                max-width: 280px;
                padding: 12px 20px;
            }
        }
        .info-container {
    background-color: var(--white);
    border-radius: 12px;
    box-shadow: var(--shadow-md);
    padding: 30px;
    margin-bottom: 40px;
}

.info-header {
    display: flex;
    align-items: center;
    margin-bottom: 25px;
}

.info-header i {
    font-size: 1.8rem;
    color: var(--primary);
    margin-right: 15px;
}

.info-header h2 {
    font-size: 1.5rem;
    color: var(--dark);
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
}

.info-card {
    background-color: var(--light);
    border-radius: 10px;
    padding: 25px;
    transition: transform 0.3s ease;
}

.info-card:hover {
    transform: translateY(-5px);
}

.info-icon {
    width: 50px;
    height: 50px;
    background-color: rgba(67, 97, 238, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 15px;
    color: var(--primary);
    font-size: 1.3rem;
}

.info-card h3 {
    font-size: 1.1rem;
    margin-bottom: 10px;
    color: var(--dark);
}

.info-card p {
    font-size: 0.95rem;
    color: var(--gray);
    line-height: 1.5;
}