:root {
        --surface: #12121a;
        --card: #1a1a26;
        --accent: #6c63ff;
        --accent2: #ff6584;
        --accent3: #43e97b;
        --text: #e8e8f0;
        --muted: #7878a0;
        --radius: 16px;
        --glow: 0 0 30px rgba(108, 99, 255, 0.25);
    }

    @keyframes bgPulse {
        0% {
            transform: scale(1) rotate(0deg);
        }

        100% {
            transform: scale(1.1) rotate(5deg);
        }
    }

    @keyframes fadeDown {
        from {
            opacity: 0;
            transform: translateY(-20px);
        }

        to {
            opacity: 1;
            transform: translateY(0);
        }
    }


    /* Upload Zone */
    /* .upload-zone {
        border: 2px dashed var(--border);
        border-radius: var(--radius);
        background: var(--header-bg);
        padding: 48px 24px;
        text-align: center;
        cursor: pointer;
        transition: all 0.3s ease;
        position: relative;
        overflow: hidden;
        box-shadow: var(--box-shadow);
    }

    @keyframes fadeUp {
        from {
            opacity: 0;
            transform: translateY(20px);
        }

        to {
            opacity: 1;
            transform: translateY(0);
        }
    } */

    /* .upload-zone::after {
        content: '';
        position: absolute;
        inset: 0;
        background: linear-gradient(135deg, rgba(108, 99, 255, 0.05), transparent);
        opacity: 0;
        transition: opacity 0.3s;
    }

    .upload-zone:hover,
    .upload-zone.drag-over {
        border-color: var(--accent);
        box-shadow: var(--glow);
    }

    .upload-zone:hover::after,
    .upload-zone.drag-over::after {
        opacity: 1;
    } */

    /* .upload-icon {
        font-size: 52px;
        margin-bottom: 16px;
        display: block;
        animation: float 3s ease-in-out infinite;
    }

    @keyframes float {

        0%,
        100% {
            transform: translateY(0);
        }

        50% {
            transform: translateY(-8px);
        }
    }

    .upload-title {
        font-size: 18px;
        font-weight: 600;
        margin-bottom: 8px;
        color: var(--primary-text);
    }

    .upload-sub {
        color: var(--muted);
        font-size: 13px;
        margin-bottom: 20px;
    }

    .btn-upload {
        display: inline-flex;
        align-items: center;
        gap: 8px;
        background: linear-gradient(135deg, var(--accent), #8b85ff);
        color: white;
        border: none;
        padding: 12px 28px;
        border-radius: 50px;
        font-size: 14px;
        font-weight: 600;
        cursor: pointer;
        transition: all 0.3s;
        font-family: 'Sora', sans-serif;
        box-shadow: 0 4px 20px rgba(108, 99, 255, 0.4);
    }

    .btn-upload:hover {
        transform: translateY(-2px);
        box-shadow: 0 8px 30px rgba(108, 99, 255, 0.5);
    }

    #fileInput {
        display: none;
    } */






.pdf-upload-pro {
    position: relative;
    min-height: 330px;
    padding: 38px 24px;
    border-radius: 24px;
    border: 3px dashed rgba(99, 102, 241, 0.45);
    background:
        radial-gradient(circle at top, rgba(99, 102, 241, 0.14), transparent 38%),
        linear-gradient(180deg, var(--header-bg), var(--section-bg));
    box-shadow: var(--card-shadow);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 18px;
    cursor: pointer;
    overflow: hidden;
    transition: 0.35s ease;
}

.pdf-upload-pro:hover,
.pdf-upload-pro.drag-over {
    transform: translateY(-4px);
    border-color: var(--primary-color);
    box-shadow: 0 22px 55px rgba(99, 102, 241, 0.18);
}

.pdf-upload-glow {
    position: absolute;
    width: 220px;
    height: 220px;
    border-radius: 50%;
    background: rgba(99, 102, 241, 0.18);
    filter: blur(45px);
    top: -80px;
    right: -60px;
    pointer-events: none;
}

.pdf-upload-icon {
    position: relative;
    width: 86px;
    height: 86px;
    border-radius: 26px;
    background: linear-gradient(135deg, var(--primary-color), #818cf8);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 42px;
    box-shadow: 0 18px 35px rgba(99, 102, 241, 0.35);
    transition: 0.35s ease;
}

.pdf-upload-pro:hover .pdf-upload-icon,
.pdf-upload-pro.drag-over .pdf-upload-icon {
    transform: scale(1.06) rotate(-3deg);
}

.pdf-upload-content {
    position: relative;
    text-align: center;
}

.pdf-upload-content h3 {
    color: var(--primary-text);
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 8px;
}

.pdf-upload-content p {
    color: var(--gray-text);
    font-size: 14px;
    line-height: 1.7;
}

.pdf-upload-btn {
    position: relative;
    border: none;
    outline: none;
    padding: 13px 24px;
    border-radius: 999px;
    background: var(--primary-color);
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 9px;
    cursor: pointer;
    box-shadow: 0 12px 28px rgba(99, 102, 241, 0.3);
    transition: 0.3s ease;
}

.pdf-upload-btn:hover {
    transform: translateY(-2px);
    background: #5558ee;
}

.pdf-upload-meta {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 4px;
}

.pdf-upload-meta span {
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(99, 102, 241, 0.08);
    color: var(--gray-text);
    border: 1px solid rgba(99, 102, 241, 0.14);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 500;
}

.pdf-upload-meta span i {
    color: var(--primary-color);
    font-size: 15px;
}

#fileInput {
    display: none;
}

@media (max-width: 576px) {
    .pdf-upload-pro {
        min-height: 300px;
        padding: 30px 18px;
        border-radius: 20px;
    }

    .pdf-upload-icon {
        width: 72px;
        height: 72px;
        border-radius: 22px;
        font-size: 34px;
    }

    .pdf-upload-content h3 {
        font-size: 21px;
    }

    .pdf-upload-btn {
        width: 100%;
        justify-content: center;
    }

    .pdf-upload-meta {
        gap: 8px;
    }

    .pdf-upload-meta span {
        font-size: 11px;
        padding: 7px 10px;
    }
}
















    /* File Info Bar */
    .file-info {
        display: none;
        background: var(--header-bg);
        border: 1px solid var(--border);
        border-radius: var(--radius);
        padding: 16px 20px;
        margin-top: 16px;
        align-items: center;
        gap: 14px;
        animation: fadeUp 0.4s ease;
    }

    .file-info.show {
        display: flex;
    }

    .file-icon-box {
        width: 44px;
        height: 44px;
        background: linear-gradient(135deg, #ff6584, #ff9a6c);
        border-radius: 10px;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 20px;
        flex-shrink: 0;
    }

    .file-details {
        flex: 1;
        min-width: 0;
    }

    .file-name {
        font-weight: 600;
        font-size: 14px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        color: var(--primary-text);
    }

    .file-size {
        color: var(--muted);
        font-size: 12px;
        margin-top: 2px;
    }

    .btn-remove {
        background: rgba(255, 101, 132, 0.15);
        border: none;
        color: var(--accent2);
        width: 32px;
        height: 32px;
        border-radius: 8px;
        cursor: pointer;
        font-size: 16px;
        display: flex;
        align-items: center;
        justify-content: center;
        transition: all 0.2s;
    }

    .btn-remove:hover {
        background: rgba(255, 101, 132, 0.3);
    }

    /* Options Panel */
    .options-panel {
        display: none;
        background: var(--header-bg);
        border: 1px solid var(--border);
        border-radius: var(--radius);
        padding: 20px;
        margin-top: 16px;
        gap: 16px;
        flex-wrap: wrap;
        animation: fadeUp 0.4s ease;
    }

    .options-panel.show {
        display: flex;
    }

    .option-group {
        flex: 1;
        min-width: 200px;
    }

    .option-label {
        font-size: 12px;
        color: var(--muted);
        text-transform: uppercase;
        letter-spacing: 1px;
        margin-bottom: 8px;
        font-family: 'Space Mono', monospace;
    }

    .toggle-row {
        display: flex;
        align-items: center;
        gap: 10px;
        margin-bottom: 10px;
    }

    .toggle {
        width: 42px;
        height: 24px;
        background: var(--border);
        border-radius: 50px;
        position: relative;
        cursor: pointer;
        transition: background 0.3s;
        flex-shrink: 0;
    }

    .toggle.on {
        background: var(--accent);
    }

    .toggle::after {
        content: '';
        position: absolute;
        width: 18px;
        height: 18px;
        background: white;
        border-radius: 50%;
        top: 3px;
        left: 3px;
        transition: left 0.3s;
    }

    .toggle.on::after {
        left: 21px;
    }

    .toggle-text {
        font-size: 13px;
        color: var(--primary-text);
    }

    .range-input {
        width: 100%;
        accent-color: var(--accent);
    }

    /* Extract Button */
    .btn-extract {
        width: 100%;
        /* background: linear-gradient(135deg, var(--accent), #ff6584); */
        background-color: var(--primary-color);
        color: white;
        border: none;
        padding: 16px;
        border-radius: var(--radius);
        font-size: 16px;
        font-weight: 700;
        cursor: pointer;
        margin-top: 16px;
        transition: all 0.3s;
        font-family: 'Sora', sans-serif;
        display: none;
        align-items: center;
        justify-content: center;
        gap: 10px;
        box-shadow: 0 4px 20px rgba(108, 99, 255, 0.3);
    }

    .btn-extract.show {
        display: flex;
    }

    .btn-extract:hover:not(:disabled) {
        transform: translateY(-2px);
        box-shadow: 0 8px 30px rgba(108, 99, 255, 0.5);
    }

    .btn-extract:disabled {
        opacity: 0.6;
        cursor: not-allowed;
        transform: none;
    }

    /* Progress */
    .progress-container {
        display: none;
        margin-top: 20px;
        animation: fadeUp 0.4s ease;
    }

    .progress-container.show {
        display: block;
    }

    .progress-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 10px;
        font-size: 13px;
    }

    .progress-status {
        color: var(--accent);
        font-weight: 600;
    }

    .progress-pct {
        color: var(--muted);
        font-family: 'Space Mono', monospace;
    }

    .progress-bar {
        height: 6px;
        background: var(--border);
        border-radius: 50px;
        overflow: hidden;
    }

    .progress-fill {
        height: 100%;
        /* background: linear-gradient(90deg, var(--accent), var(--accent2)); */
        background-color: var(--primary-color);
        border-radius: 50px;
        transition: width 0.3s ease;
        width: 0%;
    }

    .page-indicators {
        display: flex;
        flex-wrap: wrap;
        gap: 6px;
        margin-top: 12px;
    }

    .page-dot {
        width: 28px;
        height: 28px;
        border-radius: 6px;
        background: var(--border);
        font-size: 10px;
        display: flex;
        align-items: center;
        justify-content: center;
        font-family: 'Space Mono', monospace;
        transition: all 0.3s;
    }

    .page-dot.done {
        background: var(--accent3);
        color: #0a0a0f;
    }

    .page-dot.active {
        background: var(--accent);
        animation: pulse 1s ease infinite;
    }

    @keyframes pulse {

        0%,
        100% {
            opacity: 1;
        }

        50% {
            opacity: 0.5;
        }
    }

    /* Result Section */
    .result-section {
        display: none;
        margin-top: 24px;
        animation: fadeUp 0.5s ease;
    }

    .result-section.show {
        display: block;
    }

    .result-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        flex-wrap: wrap;
        gap: 12px;
        margin-bottom: 16px;
    }

    .result-title {
        font-size: 16px;
        font-weight: 700;
        color: var(--primary-text);
    }

    .result-stats {
        display: flex;
        gap: 16px;
        flex-wrap: wrap;
    }

    .stat-chip {
        background: rgba(108, 99, 255, 0.15);
        border: 1px solid rgba(108, 99, 255, 0.3);
        color: var(--accent);
        padding: 4px 12px;
        border-radius: 50px;
        font-size: 12px;
        font-family: 'Space Mono', monospace;
    }

    .actions-row {
        display: flex;
        gap: 10px;
        flex-wrap: wrap;
        margin-bottom: 16px;
    }

    .btn-action {
        display: inline-flex;
        align-items: center;
        gap: 6px;
        padding: 10px 18px;
        border-radius: 50px;
        border: 1px solid var(--border);
        background: var(--section-bg);
        color: var(--primary-text);
        font-size: 13px;
        font-weight: 600;
        cursor: pointer;
        transition: all 0.2s;
        font-family: 'Sora', sans-serif;
    }

    .btn-action:hover {
        border-color: var(--accent);
        color: var(--accent);
        background: rgba(108, 99, 255, 0.1);
    }

    .btn-action.primary {
        background: var(--accent);
        border-color: var(--accent);
        color: white;
    }

    .btn-action.primary:hover {
        background: #7c74ff;
        color: white;
    }

    /* Search Bar */
    .search-bar {
        position: relative;
        margin-bottom: 12px;
    }

    .search-bar input {
        width: 100%;
        background: var(--header-bg);
        border: 1px solid var(--border);
        color: var(--primary-text);
        padding: 12px 16px 12px 44px;
        border-radius: 50px;
        font-size: 14px;
        /* font-family: 'Sora', sans-serif; */
        outline: none;
        transition: border-color 0.3s;
    }

    .search-bar input:focus {
        border-color: var(--accent);
    }

    .search-bar .search-icon {
        position: absolute;
        left: 16px;
        top: 50%;
        transform: translateY(-50%);
        color: var(--muted);
        font-size: 16px;
    }

    .search-count {
        position: absolute;
        right: 16px;
        top: 50%;
        transform: translateY(-50%);
        font-size: 12px;
        color: var(--muted);
        /* font-family: 'Space Mono', monospace; */
    }

    /* Text Output */
    .text-output {
        background: var(--header-bg);
        border: 1px solid var(--border);
        border-radius: var(--radius);
        padding: 20px;
        max-height: 500px;
        overflow-y: auto;
        font-family: 'Space Mono', monospace;
        font-size: 13px;
        line-height: 1.8;
        white-space: pre-wrap;
        word-break: break-word;
        scrollbar-width: thin;
        scrollbar-color: var(--accent) var(--header-bg);
        position: relative;
        color: var(--primary-text);
    }

    .text-output::-webkit-scrollbar {
        width: 6px;
    }

    .text-output::-webkit-scrollbar-track {
        background: var(--header-bg);
    }

    .text-output::-webkit-scrollbar-thumb {
        background: var(--accent);
        border-radius: 3px;
    }

    .highlight {
        background: rgba(108, 99, 255, 0.4);
        border-radius: 3px;
    }

    .highlight.current {
        background: rgba(255, 101, 132, 0.6);
    }

    /* Page Navigator */
    .page-nav {
        display: none;
        background: var(--header-bg);
        border: 1px solid var(--border);
        border-radius: var(--radius);
        padding: 16px;
        margin-top: 12px;
        align-items: center;
        gap: 12px;
        flex-wrap: wrap;
    }

    .page-nav.show {
        display: flex;
    }

    .page-nav-label {
        font-size: 13px;
        color: var(--muted);
        flex: 1;
    }

    .page-pills {
        display: flex;
        gap: 6px;
        flex-wrap: wrap;
    }

    .page-pill {
        padding: 6px 14px;
        border-radius: 50px;
        background: var(--header-bg);
        border: 1px solid var(--border);
        font-size: 12px;
        cursor: pointer;
        transition: all 0.2s;
        font-family: 'Space Mono', monospace;
        color: var(--primary-text);
    }

    .page-pill:hover,
    .page-pill.active {
        background: var(--accent);
        border-color: var(--accent);
        color: white;
    }



    /* Toast */
    .toast {
        position: fixed;
        bottom: 24px;
        left: 50%;
        transform: translateX(-50%) translateY(80px);
        background: #1a1a2e;
        /* border: 1px solid var(--border); */
        color: var(--text);
        padding: 12px 24px;
        border-radius: 50px;
        font-size: 13px;
        font-weight: 600;
        z-index: 1000;
        transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
        display: flex;
        align-items: center;
        gap: 8px;
        white-space: nowrap;
    }

    .toast.show {
        transform: translateX(-50%) translateY(0);
    }

    /* Responsive */
    @media (max-width: 600px) {
        .result-header {
            flex-direction: column;
            align-items: flex-start;
        }

        .options-panel {
            gap: 10px;
        }

        .option-group {
            min-width: 100%;
        }

        .ai-input-row {
            flex-direction: column;
        }
    }



    .pdftext-guide-section {
    padding: 70px 0;
    background:
        radial-gradient(circle at top left, rgba(99, 102, 241, 0.12), transparent 34%),
        linear-gradient(180deg, var(--body-background), var(--section-bg));
    overflow: hidden;
}

.pdftext-guide-header {
    max-width: 720px;
    margin: 0 auto 34px;
    text-align: center;
}

.pdftext-guide-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border-radius: 999px;
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary-color);
    border: 1px solid rgba(99, 102, 241, 0.18);
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 14px;
}

.pdftext-guide-header h2 {
    color: var(--primary-text);
    font-size: clamp(28px, 4vw, 44px);
    line-height: 1.12;
    margin-bottom: 12px;
}

.pdftext-guide-header p {
    color: var(--gray-text);
    font-size: 15px;
    line-height: 1.8;
}

.pdftext-guide-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
}

.pdftext-step-card {
    position: relative;
    padding: 22px;
    min-height: 235px;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: var(--header-bg);
    box-shadow: var(--card-shadow);
    transition: transform 0.35s ease, border-color 0.35s ease, box-shadow 0.35s ease;
    overflow: hidden;
}

.pdftext-step-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.12), transparent 45%);
    opacity: 0;
    transition: opacity 0.35s ease;
}

.pdftext-step-card:hover {
    transform: translateY(-8px);
    border-color: rgba(99, 102, 241, 0.45);
    box-shadow: 0 18px 45px rgba(99, 102, 241, 0.16);
}

.pdftext-step-card:hover::before {
    opacity: 1;
}

.pdftext-step-top,
.pdftext-step-card h3,
.pdftext-step-card p {
    position: relative;
    z-index: 1;
}

.pdftext-step-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 26px;
}

.pdftext-step-number {
    font-size: 34px;
    font-weight: 800;
    color: transparent;
    -webkit-text-stroke: 1px rgba(99, 102, 241, 0.45);
    line-height: 1;
}

.pdftext-step-icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
    background: rgba(99, 102, 241, 0.1);
    font-size: 23px;
}

.pdftext-step-card h3 {
    color: var(--primary-text);
    font-size: 18px;
    margin-bottom: 10px;
}

.pdftext-step-card p {
    color: var(--gray-text);
    font-size: 14px;
    line-height: 1.7;
}

.pdftext-guide-note {
    margin-top: 24px;
    padding: 22px;
    border-radius: 18px;
    background: var(--header-bg);
    border: 1px solid var(--border);
    box-shadow: var(--card-shadow);
    display: flex;
    align-items: center;
    gap: 16px;
}

.pdftext-note-icon {
    width: 52px;
    height: 52px;
    border-radius: 16px;
    background: linear-gradient(135deg, var(--primary-color), #818cf8);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    flex-shrink: 0;
}

.pdftext-guide-note h3 {
    color: var(--primary-text);
    font-size: 18px;
    margin-bottom: 6px;
}

.pdftext-guide-note p {
    color: var(--gray-text);
    font-size: 14px;
    line-height: 1.7;
}

@media (max-width: 992px) {
    .pdftext-guide-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 576px) {
    .pdftext-guide-section {
        padding: 48px 0;
    }

    .pdftext-guide-grid {
        grid-template-columns: 1fr;
    }

    .pdftext-step-card {
        min-height: auto;
    }

    .pdftext-guide-note {
        align-items: flex-start;
    }
}



.pdftext-features-section {
    padding: 75px 0;
    background: var(--body-background);
}

.pdftext-features-header {
    max-width: 760px;
    margin: 0 auto 36px;
    text-align: center;
}

.pdftext-features-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border-radius: 999px;
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary-color);
    border: 1px solid rgba(99, 102, 241, 0.16);
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 14px;
}

.pdftext-features-header h2 {
    color: var(--primary-text);
    font-size: clamp(28px, 4vw, 42px);
    line-height: 1.15;
    margin-bottom: 12px;
}

.pdftext-features-header p {
    color: var(--gray-text);
    font-size: 15px;
    line-height: 1.8;
}

.pdftext-features-grid {
    display: grid;
    grid-template-columns: 1.15fr 1fr 1fr;
    gap: 18px;
}

.pdftext-feature-card {
    position: relative;
    min-height: 220px;
    padding: 24px;
    border-radius: 20px;
    border: 1px solid var(--border);
    background: var(--header-bg);
    box-shadow: var(--card-shadow);
    overflow: hidden;
    transition: transform 0.35s ease, border-color 0.35s ease, box-shadow 0.35s ease;
}

.pdftext-feature-card::after {
    content: "";
    position: absolute;
    width: 140px;
    height: 140px;
    right: -70px;
    bottom: -70px;
    border-radius: 50%;
    background: rgba(99, 102, 241, 0.12);
    transition: 0.35s ease;
}

.pdftext-feature-card:hover {
    transform: translateY(-7px);
    border-color: rgba(99, 102, 241, 0.42);
    box-shadow: 0 20px 48px rgba(99, 102, 241, 0.15);
}

.pdftext-feature-card:hover::after {
    transform: scale(1.35);
}

.pdftext-feature-large {
    grid-row: span 2;
    min-height: 458px;
    background:
        radial-gradient(circle at top right, rgba(99, 102, 241, 0.2), transparent 34%),
        var(--header-bg);
}

.pdftext-feature-icon {
    position: relative;
    z-index: 1;
    width: 54px;
    height: 54px;
    border-radius: 16px;
    background: rgba(99, 102, 241, 0.12);
    color: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    margin-bottom: 22px;
}

.pdftext-feature-icon.soft-blue {
    background: rgba(37, 99, 235, 0.1);
    color: #2563eb;
}

.pdftext-feature-icon.soft-green {
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
}

.pdftext-feature-icon.soft-orange {
    background: rgba(249, 115, 22, 0.1);
    color: #f97316;
}

.pdftext-feature-icon.soft-purple {
    background: rgba(139, 92, 246, 0.1);
    color: #8b5cf6;
}

.pdftext-feature-icon.soft-red {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

.pdftext-feature-card h3 {
    position: relative;
    z-index: 1;
    color: var(--primary-text);
    font-size: 19px;
    margin-bottom: 10px;
}

.pdftext-feature-card p {
    position: relative;
    z-index: 1;
    color: var(--gray-text);
    font-size: 14px;
    line-height: 1.75;
}

.pdftext-feature-preview {
    position: absolute;
    left: 24px;
    right: 24px;
    bottom: 24px;
    z-index: 1;
    padding: 18px;
    border-radius: 18px;
    background: var(--section-bg);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: var(--primary-color);
    font-weight: 700;
    letter-spacing: 0.5px;
}

.pdftext-feature-preview span {
    padding: 10px 14px;
    border-radius: 12px;
    background: var(--header-bg);
    color: var(--primary-text);
    border: 1px solid var(--border);
}

@media (max-width: 992px) {
    .pdftext-features-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .pdftext-feature-large {
        grid-row: auto;
        min-height: 260px;
    }

    .pdftext-feature-preview {
        position: relative;
        left: auto;
        right: auto;
        bottom: auto;
        margin-top: 24px;
    }
}

@media (max-width: 576px) {
    .pdftext-features-section {
        padding: 50px 0;
    }

    .pdftext-features-grid {
        grid-template-columns: 1fr;
    }

    .pdftext-feature-card {
        min-height: auto;
        padding: 22px;
        border-radius: 18px;
    }
}



.pdftext-content-section {
    padding: 80px 0;
    background:
        radial-gradient(circle at 10% 20%, rgba(99, 102, 241, 0.1), transparent 30%),
        var(--section-bg);
}

.pdftext-content-layout {
    display: grid;
    grid-template-columns: 1.05fr 0.95fr;
    gap: 34px;
    align-items: center;
}

.pdftext-content-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border-radius: 999px;
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary-color);
    border: 1px solid rgba(99, 102, 241, 0.16);
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 16px;
}

.pdftext-content-left h2 {
    color: var(--primary-text);
    font-size: clamp(30px, 4vw, 46px);
    line-height: 1.12;
    margin-bottom: 18px;
    max-width: 680px;
}

.pdftext-content-left p {
    color: var(--gray-text);
    font-size: 15px;
    line-height: 1.85;
    margin-bottom: 14px;
}

.pdftext-content-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    margin-top: 24px;
}

.pdftext-content-btn {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 13px 22px;
    border-radius: 999px;
    background: var(--primary-color);
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    box-shadow: 0 14px 30px rgba(99, 102, 241, 0.28);
    transition: 0.3s ease;
}

.pdftext-content-btn:hover {
    transform: translateY(-2px);
    background: #5558ee;
}

.pdftext-content-actions span {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: var(--gray-text);
    font-size: 13px;
    font-weight: 500;
}

.pdftext-content-actions span i {
    color: var(--primary-color);
}

.pdftext-content-right {
    position: relative;
    display: grid;
    gap: 14px;
}

.pdftext-content-card {
    position: relative;
    padding: 18px;
    border-radius: 18px;
    background: var(--header-bg);
    border: 1px solid var(--border);
    box-shadow: var(--card-shadow);
    display: flex;
    align-items: flex-start;
    gap: 14px;
    transition: 0.3s ease;
}

.pdftext-content-card:hover,
.pdftext-content-card.active {
    transform: translateX(-6px);
    border-color: rgba(99, 102, 241, 0.38);
    box-shadow: 0 18px 40px rgba(99, 102, 241, 0.14);
}

.pdftext-content-card-icon {
    width: 48px;
    height: 48px;
    border-radius: 15px;
    background: rgba(99, 102, 241, 0.11);
    color: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    flex-shrink: 0;
}

.pdftext-content-card-icon.green {
    background: rgba(16, 185, 129, 0.11);
    color: #10b981;
}

.pdftext-content-card-icon.orange {
    background: rgba(249, 115, 22, 0.11);
    color: #f97316;
}

.pdftext-content-card h3 {
    color: var(--primary-text);
    font-size: 17px;
    margin-bottom: 6px;
}

.pdftext-content-card p {
    color: var(--gray-text);
    font-size: 13px;
    line-height: 1.7;
}

.pdftext-mini-preview {
    margin-top: 8px;
    padding: 18px;
    border-radius: 20px;
    background: linear-gradient(135deg, var(--primary-color), #818cf8);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    box-shadow: 0 20px 45px rgba(99, 102, 241, 0.28);
}

.pdftext-mini-preview > i {
    color: #fff;
    font-size: 24px;
    flex-shrink: 0;
}

.pdftext-mini-file {
    flex: 1;
    padding: 14px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.22);
    color: #fff;
}

.pdftext-mini-file span {
    display: block;
    font-size: 20px;
    font-weight: 800;
    line-height: 1;
    margin-bottom: 6px;
}

.pdftext-mini-file small {
    display: block;
    font-size: 12px;
    opacity: 0.86;
}

@media (max-width: 900px) {
    .pdftext-content-layout {
        grid-template-columns: 1fr;
    }

    .pdftext-content-card:hover,
    .pdftext-content-card.active {
        transform: translateY(-4px);
    }
}

@media (max-width: 576px) {
    .pdftext-content-section {
        padding: 52px 0;
    }

    .pdftext-content-card {
        padding: 16px;
        border-radius: 16px;
    }

    .pdftext-mini-preview {
        flex-direction: column;
        align-items: stretch;
    }

    .pdftext-mini-preview > i {
        transform: rotate(90deg);
        align-self: center;
    }
}




.pdftext-example-section {
    padding: 75px 0;
    background:
        radial-gradient(circle at 85% 20%, rgba(99, 102, 241, 0.12), transparent 32%),
        var(--body-background);
}

.pdftext-example-header {
    max-width: 720px;
    margin: 0 auto 36px;
    text-align: center;
}

.pdftext-example-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border-radius: 999px;
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary-color);
    border: 1px solid rgba(99, 102, 241, 0.16);
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 14px;
}

.pdftext-example-header h2 {
    color: var(--primary-text);
    font-size: clamp(28px, 4vw, 42px);
    line-height: 1.15;
    margin-bottom: 12px;
}

.pdftext-example-header p {
    color: var(--gray-text);
    font-size: 15px;
    line-height: 1.8;
}

.pdftext-example-box {
    display: grid;
    grid-template-columns: 1fr 90px 1.25fr;
    gap: 18px;
    align-items: center;
}

.pdftext-example-file,
.pdftext-example-output {
    border: 1px solid var(--border);
    background: var(--header-bg);
    border-radius: 22px;
    box-shadow: var(--card-shadow);
    padding: 24px;
    overflow: hidden;
}

.pdftext-example-file {
    min-height: 390px;
}

.pdftext-example-file-top {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 26px;
}

.pdftext-example-file-icon {
    width: 56px;
    height: 56px;
    border-radius: 18px;
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    flex-shrink: 0;
}

.pdftext-example-file h3,
.pdftext-example-output h3 {
    color: var(--primary-text);
    font-size: 18px;
    margin-bottom: 5px;
}

.pdftext-example-file p,
.pdftext-example-output p {
    color: var(--gray-text);
    font-size: 13px;
}

.pdftext-doc-preview {
    padding: 22px;
    border-radius: 18px;
    background: var(--section-bg);
    border: 1px solid var(--border);
    display: grid;
    gap: 12px;
}

.pdftext-doc-preview span {
    display: block;
    height: 12px;
    border-radius: 999px;
    background: linear-gradient(90deg, rgba(99, 102, 241, 0.24), rgba(99, 102, 241, 0.08));
}

.pdftext-doc-preview span.short {
    width: 55%;
}

.pdftext-doc-preview span.medium {
    width: 76%;
}

.pdftext-example-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    margin-top: 22px;
}

.pdftext-example-tags span {
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(99, 102, 241, 0.08);
    color: var(--primary-color);
    border: 1px solid rgba(99, 102, 241, 0.14);
    font-size: 12px;
    font-weight: 600;
}

.pdftext-example-arrow {
    width: 64px;
    height: 64px;
    border-radius: 20px;
    background: linear-gradient(135deg, var(--primary-color), #818cf8);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    margin: 0 auto;
    box-shadow: 0 18px 38px rgba(99, 102, 241, 0.28);
}

.pdftext-example-output {
    min-height: 430px;
    position: relative;
}

.pdftext-output-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 20px;
}

.pdftext-output-top span {
    padding: 8px 12px;
    border-radius: 12px;
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
    font-size: 13px;
    font-weight: 800;
}

.pdftext-output-content {
    padding: 18px;
    border-radius: 18px;
    background: var(--section-bg);
    border: 1px solid var(--border);
    display: grid;
    gap: 10px;
}

.pdftext-output-content p {
    color: var(--primary-text);
    font-size: 14px;
    line-height: 1.7;
}

.pdftext-output-content strong {
    color: var(--primary-color);
}

.pdftext-output-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 20px;
}

.pdftext-output-actions button {
    border: 1px solid var(--border);
    background: var(--header-bg);
    color: var(--primary-text);
    padding: 11px 16px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.3s ease;
}

.pdftext-output-actions button:first-child {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: #fff;
}

.pdftext-output-actions button:hover {
    transform: translateY(-2px);
    border-color: var(--primary-color);
}

@media (max-width: 900px) {
    .pdftext-example-box {
        grid-template-columns: 1fr;
    }

    .pdftext-example-arrow {
        transform: rotate(90deg);
    }

    .pdftext-example-file,
    .pdftext-example-output {
        min-height: auto;
    }
}

@media (max-width: 576px) {
    .pdftext-example-section {
        padding: 52px 0;
    }

    .pdftext-example-file,
    .pdftext-example-output {
        padding: 18px;
        border-radius: 18px;
    }

    .pdftext-output-actions button {
        width: 100%;
        justify-content: center;
    }
}



.pdftext-faq-section {
    padding: 75px 0;
    background:
        radial-gradient(circle at 15% 10%, rgba(99, 102, 241, 0.12), transparent 32%),
        var(--section-bg);
}

.pdftext-faq-header {
    max-width: 720px;
    margin: 0 auto 34px;
    text-align: center;
}

.pdftext-faq-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border-radius: 999px;
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary-color);
    border: 1px solid rgba(99, 102, 241, 0.16);
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 14px;
}

.pdftext-faq-header h2 {
    color: var(--primary-text);
    font-size: clamp(28px, 4vw, 42px);
    line-height: 1.15;
    margin-bottom: 12px;
}

.pdftext-faq-header p {
    color: var(--gray-text);
    font-size: 15px;
    line-height: 1.8;
}

.pdftext-faq-list {
    max-width: 850px;
    margin: 0 auto;
    display: grid;
    gap: 14px;
}

.pdftext-faq-item {
    border: 1px solid var(--border);
    background: var(--header-bg);
    border-radius: 18px;
    box-shadow: var(--card-shadow);
    overflow: hidden;
    transition: 0.3s ease;
}

.pdftext-faq-item.active {
    border-color: rgba(99, 102, 241, 0.42);
    box-shadow: 0 18px 42px rgba(99, 102, 241, 0.14);
}

.pdftext-faq-question {
    width: 100%;
    border: none;
    outline: none;
    background: transparent;
    padding: 20px 22px;
    color: var(--primary-text);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    cursor: pointer;
    text-align: left;
    font-size: 15px;
    font-weight: 700;
}

.pdftext-faq-question i {
    width: 34px;
    height: 34px;
    border-radius: 12px;
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: 0.3s ease;
}

.pdftext-faq-item.active .pdftext-faq-question i {
    transform: rotate(180deg);
    background: var(--primary-color);
    color: #fff;
}

.pdftext-faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.38s ease;
}

.pdftext-faq-answer p {
    padding: 0 22px 20px;
    color: var(--gray-text);
    font-size: 14px;
    line-height: 1.8;
}

@media (max-width: 576px) {
    .pdftext-faq-section {
        padding: 52px 0;
    }

    .pdftext-faq-question {
        padding: 18px;
        font-size: 14px;
    }

    .pdftext-faq-answer p {
        padding: 0 18px 18px;
    }
}



.pdftext-related-section {
    padding: 75px 0;
    background:
        radial-gradient(circle at 80% 15%, rgba(99, 102, 241, 0.12), transparent 32%),
        var(--body-background);
}

.pdftext-related-header {
    max-width: 760px;
    margin: 0 auto 36px;
    text-align: center;
}

.pdftext-related-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border-radius: 999px;
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary-color);
    border: 1px solid rgba(99, 102, 241, 0.16);
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 14px;
}

.pdftext-related-header h2 {
    color: var(--primary-text);
    font-size: clamp(28px, 4vw, 42px);
    line-height: 1.15;
    margin-bottom: 12px;
}

.pdftext-related-header p {
    color: var(--gray-text);
    font-size: 15px;
    line-height: 1.8;
}

.pdftext-related-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
}

.pdftext-related-card {
    position: relative;
    min-height: 170px;
    padding: 22px;
    border-radius: 20px;
    background: var(--header-bg);
    border: 1px solid var(--border);
    box-shadow: var(--card-shadow);
    display: flex;
    align-items: flex-start;
    gap: 15px;
    overflow: hidden;
    transition: 0.35s ease;
}

.pdftext-related-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, color-mix(in srgb, var(--tool-color) 13%, transparent), transparent 55%);
    opacity: 0;
    transition: 0.35s ease;
}

.pdftext-related-card:hover {
    transform: translateY(-7px);
    border-color: color-mix(in srgb, var(--tool-color) 45%, var(--border));
    box-shadow: 0 20px 48px color-mix(in srgb, var(--tool-color) 16%, transparent);
}

.pdftext-related-card:hover::before {
    opacity: 1;
}

.pdftext-related-icon,
.pdftext-related-card h3,
.pdftext-related-card p,
.pdftext-related-arrow {
    position: relative;
    z-index: 1;
}

.pdftext-related-icon {
    width: 52px;
    height: 52px;
    border-radius: 16px;
    background: color-mix(in srgb, var(--tool-color) 12%, transparent);
    color: var(--tool-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 25px;
    flex-shrink: 0;
    transition: 0.35s ease;
}

.pdftext-related-card:hover .pdftext-related-icon {
    background: var(--tool-color);
    color: #fff;
    transform: scale(1.06) rotate(-4deg);
}

.pdftext-related-card h3 {
    color: var(--primary-text);
    font-size: 17px;
    margin-bottom: 7px;
}

.pdftext-related-card p {
    color: var(--gray-text);
    font-size: 13px;
    line-height: 1.65;
}

.pdftext-related-arrow {
    position: absolute;
    right: 18px;
    bottom: 18px;
    width: 36px;
    height: 36px;
    border-radius: 12px;
    background: var(--section-bg);
    color: var(--tool-color);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    transform: translateX(8px);
    opacity: 0;
    transition: 0.35s ease;
}

.pdftext-related-card:hover .pdftext-related-arrow {
    transform: translateX(0);
    opacity: 1;
}

@media (max-width: 900px) {
    .pdftext-related-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 576px) {
    .pdftext-related-section {
        padding: 52px 0;
    }

    .pdftext-related-grid {
        grid-template-columns: 1fr;
    }

    .pdftext-related-card {
        min-height: auto;
        padding: 20px;
        border-radius: 18px;
    }

    .pdftext-related-arrow {
        opacity: 1;
        transform: translateX(0);
    }
}






/* ===== Workbench Layout ===== */
.pdf-tool-grid {
    display: grid;
    grid-template-columns: 360px 1fr;
    gap: 22px;
    align-items: start;
}

.pdf-tool-left {
    position: sticky;
    top: 20px;
    display: flex;
    flex-direction: column;

    /* align-self: start;
    max-height: calc(100dvh - 40px);
    overflow-y: auto;
    overflow-x: hidden; */
}

.pdf-tool-right {
    min-height: 480px;
}

/* Empty state */
.result-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    min-height: 480px;
    border: 2px dashed var(--border);
    border-radius: var(--radius);
    background: var(--header-bg);
    padding: 40px 20px;
}

.result-placeholder-icon {
    width: 68px;
    height: 68px;
    border-radius: 20px;
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    margin-bottom: 18px;
}

.result-placeholder h3 {
    color: var(--primary-text);
    font-size: 17px;
    margin-bottom: 6px;
}

.result-placeholder p {
    color: var(--gray-text);
    font-size: 13px;
    max-width: 320px;
}

/* Compact upload zone */
.pdf-upload-pro {
    min-height: 210px;
    padding: 24px 18px;
    border-radius: 20px;
    gap: 12px;
}

.pdf-upload-icon {
    width: 56px;
    height: 56px;
    border-radius: 18px;
    font-size: 28px;
}

.pdf-upload-content h3 {
    font-size: 18px;
    margin-bottom: 5px;
}

.pdf-upload-content p {
    font-size: 13px;
}

.pdf-upload-btn {
    padding: 10px 20px;
    font-size: 13px;
}

.pdf-upload-meta {
    gap: 8px;
}

.pdf-upload-meta span {
    font-size: 11px;
    padding: 6px 10px;
}

/* Refined file icon (icon font instead of emoji box) */
.file-icon-box {
    width: 44px;
    height: 44px;
    background: rgba(99, 102, 241, 0.12);
    color: var(--primary-color);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}

.btn-remove i,
.result-title i {
    font-size: 16px;
}

.result-title {
    display: flex;
    align-items: center;
    gap: 8px;
}

.result-title i {
    color: var(--accent3);
}

.btn-extract i,
.btn-action i {
    font-size: 15px;
}

/* Result text output — taller since it now lives beside the form */
.text-output {
    max-height: 640px;
}

/* Keyboard accessibility */
.upload-zone:focus-visible,
.btn-extract:focus-visible,
.btn-action:focus-visible,
.toggle:focus-visible,
.page-pill:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* ===== Responsive ===== */
@media (max-width: 900px) {
    .pdf-tool-grid {
        grid-template-columns: 1fr;
    }

    .pdf-tool-left {
        position: static;
    }

    .result-placeholder,
    .pdf-tool-right {
        min-height: auto;
    }

    .text-output {
        max-height: 420px;
    }
}

@media (max-width: 576px) {
    .pdf-upload-pro {
        min-height: 190px;
        padding: 20px 16px;
    }

    .actions-row .btn-action {
        flex: 1;
        justify-content: center;
    }
}

/* ========================================================================== 
   PDF TO TEXT WORKBENCH V2
   Mobile-first interaction and accessibility overrides
   ========================================================================== */

.pdftext-hero {
    position: relative;
    padding-bottom: 72px;
    /* overflow: visible; */
}


.pdftext-hero-badge,
.pdf-private-chip {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    border: 1px solid rgba(99, 102, 241, .18);
    background: rgba(99, 102, 241, .09);
    color: var(--primary-color);
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
}

.pdftext-hero-badge {
    padding: 8px 13px;
    margin-bottom: 14px;
}

.pdf-workbench {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: minmax(320px, 400px) minmax(0, 1fr);
    gap: 20px;
    align-items: start;
    max-width: 1280px;
    margin: 34px auto 0;
}

.pdf-tool-left,
.pdf-tool-right {
    border: 1px solid var(--border);
    background: var(--header-bg);
    box-shadow: var(--card-shadow);
}

.pdf-tool-left {
    position: sticky;
    top: 90px;
    padding: 18px;
    border-radius: 24px;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.pdf-tool-right {
    min-height: 690px;
    padding: 20px;
    border-radius: 24px;
    min-width: 0;
}

.pdf-panel-heading,
/* .pdf-options-heading, */
.result-topbar,
.result-heading-wrap,
.pdf-progress-bottom,
.result-footer-note {
    display: flex;
    align-items: center;
}

.pdf-panel-heading,
/* .pdf-options-heading, */
.result-topbar,
.pdf-progress-bottom,
.result-footer-note {
    justify-content: space-between;
}

.pdf-panel-heading {
    gap: 12px;
    margin: 2px 2px 15px;
}

.pdf-panel-heading h2,
.pdf-options-heading h3 {
    color: var(--primary-text);
    line-height: 1.25;
    margin: 3px 0 0;
}

.pdf-panel-heading h2 {
    font-size: 17px;
}

.pdf-options-heading h3 {
    font-size: 16px;
}

.pdf-step-label {
    display: inline-flex;
    color: var(--primary-color);
    font-size: 10px;
    line-height: 1;
    font-weight: 800;
    letter-spacing: .1em;
    text-transform: uppercase;
}

.pdf-private-chip {
    flex-shrink: 0;
    padding: 7px 10px;
    color: #059669;
    border-color: rgba(16, 185, 129, .2);
    background: rgba(16, 185, 129, .09);
}

.pdf-upload-pro {
    min-height: 280px;
    padding: 28px 18px 22px;
    gap: 13px;
    border-width: 1.5px;
    border-radius: 20px;
    border-color: rgba(99, 102, 241, .34);
    background:
        radial-gradient(circle at 50% -20%, rgba(99, 102, 241, .18), transparent 52%),
        var(--section-bg);
    box-shadow: none;
    isolation: isolate;
}

.pdf-upload-pro:hover,
.pdf-upload-pro.drag-over,
.pdf-upload-pro:focus-visible {
    transform: none;
    border-color: var(--primary-color);
    background:
        radial-gradient(circle at 50% -20%, rgba(99, 102, 241, .24), transparent 55%),
        var(--section-bg);
    box-shadow: inset 0 0 0 3px rgba(99, 102, 241, .06), 0 18px 42px rgba(99, 102, 241, .12);
}

.pdf-upload-pro.drag-over .pdf-upload-icon {
    transform: translateY(-4px) scale(1.05);
}

.pdf-upload-icon {
    width: 68px;
    height: 68px;
    border-radius: 20px;
    font-size: 32px;
    box-shadow: 0 14px 30px rgba(99, 102, 241, .28);
}

.pdf-upload-content h3 {
    font-size: 19px;
    margin-bottom: 4px;
}

.pdf-upload-content p {
    font-size: 12px;
}

.pdf-upload-btn {
    min-height: 42px;
    padding: 10px 19px;
}

.pdf-upload-meta {
    gap: 6px;
}

.pdf-upload-meta span {
    padding: 6px 8px;
    font-size: 10px;
    white-space: nowrap;
}

.pdf-upload-loading {
    position: absolute;
    inset: 0;
    z-index: 5;
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    color: var(--primary-text);
    background: color-mix(in srgb, var(--header-bg) 92%, transparent);
    backdrop-filter: blur(8px);
}

.pdf-upload-loading.show {
    display: flex;
}

.pdf-spinner {
    width: 32px;
    height: 32px;
    border: 3px solid rgba(99, 102, 241, .18);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: pdfSpin .75s linear infinite;
}

@keyframes pdfSpin { to { transform: rotate(360deg); } }

.file-info {
    margin-top: 12px;
    padding: 13px;
    border-radius: 15px;
    background: var(--section-bg);
}

.file-icon-box {
    width: 46px;
    height: 46px;
    border-radius: 14px;
}

.file-size,
.file-pages {
    color: var(--gray-text);
    font-size: 11px;
    line-height: 1.5;
}

.file-pages {
    color: var(--primary-color);
    font-weight: 600;
}

.btn-remove {
    width: 36px;
    height: 36px;
    border-radius: 11px;
}

.options-panel {
    margin-top: 12px;
    padding: 16px;
    gap: 17px;
    border-radius: 17px;
    background: var(--section-bg);
}

.options-panel.show {
    display: grid;
}



.pdf-link-button,
.pdf-cancel-btn,
.pdf-new-file-btn {
    border: 0;
    background: transparent;
    color: var(--primary-color);
    font: inherit;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
}

.option-group {
    min-width: 0;
    border: 0;
    padding: 0;
    margin: 0;
}

.option-label {
    display: block;
    width: 100%;
    margin: 0 0 9px;
    color: var(--gray-text);
    font-family: inherit;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .09em;
}

.pdf-segmented {
    display: grid;
    grid-template-columns: 1fr 1fr;
    padding: 4px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--header-bg);
    margin-bottom: 10px;
}

.pdf-segment {
    min-height: 38px;
    border: 0;
    border-radius: 9px;
    background: transparent;
    color: var(--gray-text);
    font: inherit;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: .2s ease;
}

.pdf-segment.active {
    color: #fff;
    background: var(--primary-color);
    box-shadow: 0 6px 16px rgba(99, 102, 241, .2);
}

.pdf-range-row {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 8px;
    align-items: end;
    margin-top: 11px;
}

.pdf-range-row[hidden] { display: none; }

.pdf-range-row label span {
    display: block;
    margin: 0 0 5px 2px;
    color: var(--gray-text);
    font-size: 10px;
    font-weight: 700;
}

.pdf-range-row input {
    width: 100%;
    height: 40px;
    padding: 8px 10px;
    border: 1px solid var(--border);
    border-radius: 10px;
    outline: none;
    background: var(--header-bg);
    color: var(--primary-text);
    font: inherit;
    font-size: 13px;
}

.pdf-range-row input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, .1);
}

.pdf-range-separator {
    padding-bottom: 11px;
    color: var(--gray-text);
    font-size: 11px;
}

.pdf-range-help {
    grid-column: 1 / -1;
    color: var(--gray-text);
    font-size: 10px;
}

.pdf-switch-row {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 0;
    border: 0;
    border-top: 1px solid var(--border);
    background: transparent;
    color: inherit;
    text-align: left;
    cursor: pointer;
}

.pdf-switch-row:first-of-type { border-top: 0; }

.pdf-switch-row strong,
.pdf-switch-row small {
    display: block;
}

.pdf-switch-row strong {
    color: var(--primary-text);
    font-size: 12px;
    margin-bottom: 2px;
}

.pdf-switch-row small {
    color: var(--gray-text);
    font-size: 10px;
    line-height: 1.45;
}

.toggle {
    width: 39px;
    height: 22px;
}

.toggle::after {
    width: 16px;
    height: 16px;
}

.toggle.on::after { left: 20px; }

.btn-extract {
    min-height: 52px;
    margin-top: 12px;
    padding: 13px 16px;
    border-radius: 14px;
    box-shadow: 0 12px 26px rgba(99, 102, 241, .24);
}

.btn-extract.show { display: flex; }

.btn-extract kbd {
    margin-left: auto;
    padding: 4px 7px;
    border: 1px solid rgba(255,255,255,.2);
    border-radius: 6px;
    background: rgba(255,255,255,.12);
    color: rgba(255,255,255,.82);
    font: inherit;
    font-size: 9px;
}

.progress-container {
    margin-top: 12px;
    padding: 15px;
    border: 1px solid var(--border);
    border-radius: 15px;
    background: var(--section-bg);
}

.progress-header > div {
    min-width: 0;
}

.progress-status,
.progress-header small {
    display: block;
}

.progress-status {
    overflow: hidden;
    color: var(--primary-text);
    text-overflow: ellipsis;
    white-space: nowrap;
}

.progress-header small {
    margin-top: 3px;
    color: var(--gray-text);
    font-size: 10px;
}

.progress-bar { height: 8px; }

.pdf-progress-bottom {
    gap: 10px;
    margin-top: 9px;
}

.page-indicators {
    min-width: 0;
    margin: 0;
    flex-wrap: nowrap;
    overflow: hidden;
}

.page-dot {
    width: 8px;
    height: 8px;
    min-width: 8px;
    border-radius: 50%;
    color: transparent;
}

.page-dot.active,
.page-dot.done { color: transparent; }

.pdf-cancel-btn {
    flex-shrink: 0;
    color: #ef4444;
}

.result-placeholder {
    min-height: 648px;
    padding: 48px 24px;
    border-width: 1px;
    border-radius: 19px;
    background:
        radial-gradient(circle at 50% 25%, rgba(99, 102, 241, .10), transparent 35%),
        var(--section-bg);
}

.result-placeholder h2 {
    margin: 6px 0 8px;
    color: var(--primary-text);
    font-size: clamp(20px, 2.3vw, 28px);
}

.result-placeholder p {
    max-width: 430px;
    font-size: 13px;
    line-height: 1.7;
}

.result-placeholder-visual {
    display: flex;
    align-items: center;
    gap: 18px;
    margin-bottom: 26px;
}

.result-placeholder-file,
.result-placeholder-text {
    width: 128px;
    height: 158px;
    padding: 18px;
    border: 1px solid var(--border);
    border-radius: 17px;
    background: var(--header-bg);
    box-shadow: 0 20px 50px rgba(15, 23, 42, .08);
}

.result-placeholder-file { transform: rotate(-4deg); }
.result-placeholder-text { transform: rotate(4deg); }

.result-placeholder-file i,
.result-placeholder-text i {
    display: flex;
    width: 34px;
    height: 34px;
    align-items: center;
    justify-content: center;
    margin-bottom: 18px;
    border-radius: 10px;
    background: rgba(239, 68, 68, .10);
    color: #ef4444;
    font-size: 18px;
}

.result-placeholder-text i {
    background: rgba(99, 102, 241, .10);
    color: var(--primary-color);
}

.result-placeholder-file span,
.result-placeholder-text span {
    display: block;
    height: 6px;
    margin-top: 9px;
    border-radius: 999px;
    background: var(--border);
}

.result-placeholder-file span.short,
.result-placeholder-text span.short { width: 62%; }

.result-placeholder-arrow {
    display: flex;
    width: 42px;
    height: 42px;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--primary-color);
    color: #fff;
    box-shadow: 0 10px 24px rgba(99, 102, 241, .25);
}

.result-placeholder-tips {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin-top: 20px;
}

.result-placeholder-tips span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 10px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--header-bg);
    color: var(--gray-text);
    font-size: 10px;
    font-weight: 700;
}

.result-section {
    margin: 0;
}

.result-section.show {
    display: block;
}

.result-topbar {
    gap: 18px;
    margin-bottom: 16px;
}

.result-heading-wrap {
    min-width: 0;
    gap: 11px;
}

.result-success-icon {
    display: flex;
    width: 42px;
    height: 42px;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    border-radius: 13px;
    background: rgba(16, 185, 129, .11);
    color: #10b981;
    font-size: 21px;
}

.result-title {
    font-size: 16px;
}

.result-heading-wrap p {
    margin-top: 3px;
    color: var(--gray-text);
    font-size: 11px;
}

.pdf-new-file-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 36px;
    padding: 8px 11px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--section-bg);
    color: var(--primary-text);
    white-space: nowrap;
}

.result-stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 9px;
    margin-bottom: 14px;
}

.stat-chip {
    display: flex;
    flex-direction: column;
    min-width: 0;
    padding: 11px 12px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--section-bg);
    color: inherit;
}

.stat-chip strong {
    overflow: hidden;
    color: var(--primary-text);
    font-family: inherit;
    font-size: 16px;
    line-height: 1.2;
    text-overflow: ellipsis;
}

.stat-chip small {
    margin-top: 3px;
    color: var(--gray-text);
    font-family: inherit;
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .05em;
}

.pdf-result-toolbar {
    display: grid;
    grid-template-columns: auto minmax(240px, 1fr);
    gap: 10px;
    align-items: center;
    margin-bottom: 12px;
}

.actions-row {
    flex-wrap: nowrap;
    margin: 0;
}

.btn-action {
    min-height: 42px;
    padding: 9px 13px;
    border-radius: 11px;
    white-space: nowrap;
}

.search-bar {
    min-width: 0;
    margin: 0;
}

.search-bar input {
    height: 44px;
    padding: 10px 142px 10px 40px;
    border-radius: 12px;
    background: var(--section-bg);
}

.search-count {
    right: 80px;
    max-width: 60px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.search-controls {
    position: absolute;
    top: 50%;
    right: 7px;
    display: flex;
    transform: translateY(-50%);
}

.search-controls[hidden] { display: none; }

.search-controls button {
    display: flex;
    width: 31px;
    height: 31px;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--gray-text);
    cursor: pointer;
}

.search-controls button:hover {
    background: var(--header-bg);
    color: var(--primary-color);
}

.pdf-scan-warning {
    display: flex;
    gap: 10px;
    margin-bottom: 12px;
    padding: 12px 13px;
    border: 1px solid rgba(245, 158, 11, .24);
    border-radius: 12px;
    background: rgba(245, 158, 11, .08);
    color: #d97706;
}

.pdf-scan-warning[hidden] { display: none; }

.pdf-scan-warning > i {
    flex-shrink: 0;
    margin-top: 2px;
    font-size: 18px;
}

.pdf-scan-warning strong,
.pdf-scan-warning p { display: block; }
.pdf-scan-warning strong { font-size: 11px; }
.pdf-scan-warning p { margin-top: 3px; color: var(--gray-text); font-size: 10px; line-height: 1.5; }

.page-nav {
    margin: 0 0 10px;
    padding: 9px 10px;
    border-radius: 11px;
    flex-wrap: nowrap;
    background: var(--section-bg);
}

.page-nav-label {
    flex: 0 0 auto;
    white-space: nowrap;
    font-size: 10px;
    font-weight: 700;
}

.page-pills {
    min-width: 0;
    overflow-x: auto;
    flex-wrap: nowrap;
    scrollbar-width: none;
}

.page-pills::-webkit-scrollbar { display: none; }

.page-pill {
    flex: 0 0 auto;
    min-width: 34px;
    min-height: 30px;
    padding: 5px 9px;
    border-radius: 8px;
    background: var(--header-bg);
    font-family: inherit;
    font-size: 10px;
}

.text-output {
    max-height: 492px;
    min-height: 390px;
    padding: 22px;
    border-radius: 15px;
    background: var(--section-bg);
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
    font-size: 13px;
    line-height: 1.75;
    white-space: normal;
    scroll-behavior: smooth;
}

.text-page {
    display: block;
    scroll-margin-top: 16px;
}

.text-page + .text-page { margin-top: 26px; }

.text-page-label {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
    color: var(--primary-color);
    font-family: inherit;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .09em;
    text-transform: uppercase;
}

.text-page-label::after {
    content: "";
    height: 1px;
    flex: 1;
    background: var(--border);
}

.text-page-content {
    display: block;
    color: var(--primary-text);
    white-space: pre-wrap;
    word-break: break-word;
}

.text-page-empty {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 8px 10px;
    border-radius: 9px;
    background: rgba(245, 158, 11, .08);
    color: #d97706;
    font-size: 11px;
}

.highlight {
    padding: 1px 2px;
    background: rgba(250, 204, 21, .48);
    color: inherit;
    border-radius: 3px;
}

.highlight.current {
    outline: 2px solid var(--primary-color);
    background: rgba(99, 102, 241, .24);
}

.result-footer-note {
    gap: 12px;
    margin-top: 10px;
    color: var(--gray-text);
    font-size: 9px;
}

.result-footer-note span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.result-footer-note span:first-child {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: #059669;
}

.toast {
    max-width: min(90vw, 440px);
    padding: 12px 18px;
    border: 1px solid rgba(255,255,255,.10);
    border-radius: 12px;
    background: #111827;
    box-shadow: 0 18px 50px rgba(0,0,0,.25);
    color: #fff;
    line-height: 1.45;
    white-space: normal;
    text-align: center;
}

.upload-zone:focus-visible,
.btn-extract:focus-visible,
.btn-action:focus-visible,
.pdf-segment:focus-visible,
.pdf-switch-row:focus-visible,
.pdf-new-file-btn:focus-visible,
.pdf-link-button:focus-visible,
.pdf-cancel-btn:focus-visible,
.search-controls button:focus-visible,
.page-pill:focus-visible {
    outline: 3px solid rgba(99, 102, 241, .30);
    outline-offset: 2px;
}

@media (max-width: 1080px) {
    .pdf-workbench {
        grid-template-columns: 350px minmax(0, 1fr);
    }

    .pdf-result-toolbar {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 860px) {
    .pdftext-hero { padding-bottom: 54px; }

    .pdf-workbench {
        grid-template-columns: 1fr;
        max-width: 720px;
    }

    .pdf-tool-left {
        position: static;
        /* position: relative;
        top: auto;
        max-height: none;
        overflow: visible; */
    }

    .pdf-tool-right {
        min-height: auto;
    }

    .result-placeholder {
        min-height: 460px;
    }

    .text-output {
        max-height: 540px;
    }
}

@media (max-width: 576px) {
    .pdftext-hero { padding-bottom: 42px; }


    .pdftext-hero-badge {
        font-size: 10px;
    }

    .pdf-workbench {
        gap: 14px;
        margin-top: 24px;
    }

    .pdf-tool-left,
    .pdf-tool-right {
        padding: 13px;
        border-radius: 18px;
    }

    .pdf-panel-heading { margin-bottom: 12px; }
    .pdf-panel-heading h2 { font-size: 15px; }
    .pdf-private-chip { padding: 6px 8px; font-size: 10px; }

    .pdf-upload-pro {
        min-height: 250px;
        padding: 25px 12px 18px;
        border-radius: 16px;
    }

    .pdf-upload-icon {
        width: 60px;
        height: 60px;
        border-radius: 17px;
        font-size: 28px;
    }

    .pdf-upload-content h3 { font-size: 17px; }

    .pdf-upload-meta {
        width: 100%;
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .pdf-upload-meta span {
        justify-content: center;
        padding: 6px 4px;
        font-size: 9px;
    }

    .pdf-upload-meta span i { display: none; }

    .options-panel { padding: 14px; }
    .btn-extract kbd { display: none; }

    .result-placeholder {
        min-height: 400px;
        padding: 34px 14px;
    }

    .result-placeholder-visual { gap: 9px; }

    .result-placeholder-file,
    .result-placeholder-text {
        width: 92px;
        height: 120px;
        padding: 13px;
        border-radius: 13px;
    }

    .result-placeholder-file i,
    .result-placeholder-text i {
        width: 28px;
        height: 28px;
        margin-bottom: 12px;
        font-size: 15px;
    }

    .result-placeholder-arrow {
        width: 34px;
        height: 34px;
    }

    .result-topbar { align-items: flex-start; }
    .result-title { font-size: 14px; }
    .result-heading-wrap p { max-width: 190px; }
    .pdf-new-file-btn span { display: none; }

    .result-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .pdf-result-toolbar {
        position: sticky;
        top: 0;
        z-index: 4;
        padding: 8px 0;
        background: var(--header-bg);
    }

    .actions-row {
        display: grid;
        grid-template-columns: 1.4fr 1fr 1fr;
        width: 100%;
        gap: 7px;
    }

    .actions-row .btn-action {
        width: 100%;
        min-width: 0;
        padding-inline: 8px;
        justify-content: center;
        font-size: 11px;
    }

    .search-bar input {
        padding-right: 132px;
        font-size: 12px;
    }

    .page-nav {
        align-items: flex-start;
        flex-direction: column;
        gap: 7px;
    }

    .page-pills { width: 100%; }

    .text-output {
        min-height: 380px;
        max-height: 62vh;
        padding: 16px;
        border-radius: 12px;
        font-size: 12px;
    }

    .result-footer-note {
        align-items: flex-start;
        flex-direction: column;
        gap: 5px;
    }

    .toast {
        bottom: max(15px, env(safe-area-inset-bottom));
        width: calc(100% - 28px);
    }
}

@media (prefers-reduced-motion: reduce) {
    .pdf-upload-pro,
    .pdf-upload-icon,
    .btn-extract,
    .toast,
    .progress-fill,
    .page-pill,
    .pdf-spinner {
        animation: none !important;
        transition: none !important;
        scroll-behavior: auto !important;
    }
}




/* Add this at the END of your existing PDF to Text CSS file. */

.text-file-group {
    display: block;
    margin: 0 0 28px;
}

.text-file-group:last-child {
    margin-bottom: 0;
}

.text-file-heading {
    position: sticky;
    top: -1px;
    z-index: 4;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    padding: 12px 14px;
    margin: 0 0 12px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--header-bg);
    color: var(--primary-text);
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.08);
}

.text-file-heading strong {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-family: inherit;
    font-size: 13px;
}

.text-file-heading small {
    color: var(--gray-text);
    font-family: inherit;
    font-size: 11px;
    white-space: nowrap;
}

.text-file-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 26px;
    padding: 5px 9px;
    border-radius: 999px;
    background: rgba(99, 102, 241, 0.12);
    color: var(--primary-color);
    font-family: inherit;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.04em;
    white-space: nowrap;
}

@media (max-width: 576px) {
    .text-file-heading {
        align-items: flex-start;
        gap: 8px;
        padding: 11px 12px;
    }

    .text-file-heading strong {
        width: calc(100% - 70px);
        flex-basis: calc(100% - 70px);
    }

    .text-file-heading small {
        width: 100%;
        padding-left: 2px;
    }
}




.pdf-files-panel {
    margin-top: 16px;
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: var(--header-bg);
}

.pdf-files-panel[hidden] {
    display: none !important;
}

.pdf-files-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 2px 2px 12px;
    border-bottom: 1px solid var(--border);
}

.pdf-files-header > div {
    min-width: 0;
}

.pdf-files-header strong {
    display: block;
    color: var(--primary-text);
    font-size: 14px;
    margin-bottom: 3px;
}

.pdf-files-header span {
    display: block;
    color: var(--gray-text);
    font-size: 12px;
}

.clear-pdf-files {
    border: 0;
    padding: 8px 11px;
    border-radius: 10px;
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    flex-shrink: 0;
}

.pdf-file-list {
    display: grid;
    gap: 10px;
    margin-top: 12px;
    max-height: 330px;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: thin;
    scrollbar-color: var(--accent) var(--header-bg);
}


.pdf-file-list::-webkit-scrollbar {
    width: 6px;
}

.pdf-file-list::-webkit-scrollbar-track {
    background: var(--header-bg);
}

.pdf-file-list::-webkit-scrollbar-thumb {
    background: var(--accent);
    border-radius: 3px;
}

.pdf-file-card {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr) auto;
    align-items: center;
    gap: 11px;
    padding: 11px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: var(--section-bg);
    transition: border-color 0.2s ease, transform 0.2s ease;
}

.pdf-file-card:hover {
    border-color: rgba(99, 102, 241, 0.45);
}

.pdf-file-card.is-error {
    border-color: rgba(239, 68, 68, 0.4);
}

.pdf-file-card.is-loading {
    opacity: 0.75;
}

.pdf-file-card-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    font-size: 22px;
}

.pdf-file-card-content {
    min-width: 0;
}

.pdf-file-card-name {
    color: var(--primary-text);
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pdf-file-card-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 5px;
    color: var(--gray-text);
    font-size: 11px;
}

.pdf-file-status {
    padding: 3px 7px;
    border-radius: 999px;
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary-color);
}

.pdf-file-card.is-error .pdf-file-status {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

.pdf-file-remove {
    width: 34px;
    height: 34px;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: var(--gray-text);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pdf-file-remove:hover {
    color: #ef4444;
    background: rgba(239, 68, 68, 0.1);
}

@media (max-width: 576px) {
    .pdf-files-header {
        align-items: flex-start;
    }

    .clear-pdf-files {
        font-size: 0;
        width: 36px;
        height: 36px;
        padding: 0;
        justify-content: center;
    }

    .clear-pdf-files i {
        font-size: 17px;
    }

    .pdf-file-list {
        max-height: none;
    }

    .pdf-file-card {
        grid-template-columns: 40px minmax(0, 1fr) 32px;
        padding: 10px;
    }

    .pdf-file-card-icon {
        width: 40px;
        height: 40px;
    }
}












.collase_container{
        display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    cursor: pointer;
    width: 100%;
}



/* .pdf-options-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    cursor: pointer;
} */

.pdf-heading-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.pdf-collapse-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border: none;
    background: transparent;
    border-radius: 8px;
    color: var(--text-secondary, #6b7280);
    cursor: pointer;
    transition: background 0.15s ease;
    flex-shrink: 0;
}

.pdf-collapse-btn:hover {
    background: var(--hover-bg, rgba(99, 102, 241, 0.08));
    color: var(--primary, #6366F1);
}

.pdf-collapse-btn svg {
    transition: transform 0.25s ease;
    pointer-events: none;
}

.pdf-collapse-btn.rotated svg {
    transform: rotate(-180deg);
}

/* JS ye height ko inline set karega, yaha sirf transition define karo */
.pdf-options-body {
    overflow: hidden;
    transition: height 0.3s ease, opacity 0.25s ease, margin-top 0.3s ease;
}