/* ==================== PDF TO HANDWRITTEN NOTES STYLES ==================== */

body {
    background: linear-gradient(135deg, #0f1419 0%, #1a2332 50%, #0f1419 100%) !important;
    color: var(--text-primary);
}

.handwritten-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    color: var(--text-primary);
}

.header-section {
    text-align: center;
    margin-bottom: 40px;
}

.header-section h1 {
    color: var(--text-primary);
    font-size: 2.5rem;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    font-weight: 800;
    flex-wrap: wrap;
}

.header-section h1 i {
    color: #f79112;
}

.header-section .subtitle {
    color: var(--text-secondary);
    font-size: 1.2rem;
    margin: 0;
    max-width: 640px;
    margin-left: auto;
    margin-right: auto;
}

/* Upload Section */
.upload-section {
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid var(--primary-light);
    border-radius: 20px;
    padding: 30px;
    box-shadow: var(--shadow-md);
    margin-bottom: 40px;
    backdrop-filter: blur(10px);
}

.drop-zone-pdf {
    border: 3px dashed var(--primary-light);
    border-radius: 15px;
    padding: 40px 30px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.03);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 220px;
}

.drop-zone-pdf:hover {
    border-color: #f79112;
    background: rgba(247, 145, 18, 0.1);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(247, 145, 18, 0.3);
}

.drop-zone-pdf.drag-over {
    border-color: #f79112;
    background: rgba(247, 145, 18, 0.15);
    transform: scale(1.02);
}

.drop-zone-pdf.loading {
    pointer-events: none;
    opacity: 0.7;
}

.drop-zone-pdf.loading .upload-content {
    opacity: 0.5;
}

.drop-zone-pdf.loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(247, 145, 18, 0.3), transparent);
    animation: hw-loading 1.5s infinite;
}

@keyframes hw-loading {
    to { left: 100%; }
}

.upload-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
}

.upload-icon {
    margin-bottom: 20px;
}

.upload-icon i {
    font-size: 3rem;
    color: #f79112;
    animation: hw-bounce 2s infinite;
}

@keyframes hw-bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.drop-zone-pdf h3 {
    color: var(--text-primary);
    font-size: 1.5rem;
    margin: 10px 0;
}

.drop-zone-pdf p {
    color: var(--text-secondary);
    font-size: 1rem;
    margin: 10px 0 20px 0;
}

.supported-formats small {
    color: #f79112;
    font-size: 0.9rem;
}

.supported-formats i {
    margin-right: 5px;
}

.upload-progress-container {
    width: 100%;
    margin-top: 20px;
    animation: hw-fadeIn 0.3s ease;
}

.upload-progress-bar {
    width: 100%;
    height: 30px;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid var(--primary-light);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: inset 0 2px 5px rgba(0,0,0,0.3);
}

.upload-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent-color) 0%, #f79112 100%);
    transition: width 0.3s ease;
    border-radius: 15px;
}

.upload-progress-text {
    margin-top: 10px;
    color: var(--text-primary);
    font-weight: 600;
    font-size: 0.95rem;
    text-align: center;
}

/* Preview */
.preview-container {
    margin-top: 30px;
    animation: hw-fadeIn 0.5s ease;
}

@keyframes hw-fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.preview-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--primary-light);
    flex-wrap: wrap;
    gap: 15px;
}

.preview-header h3 {
    color: var(--text-primary);
    font-size: 1.3rem;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.preview-header h3 i {
    color: #f79112;
}

.preview-next-hint {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin: 0 0 8px 0;
}

.btn-secondary {
    background-color: transparent;
    color: var(--text-primary);
    border: 2px solid var(--primary-light);
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
}

.btn-secondary:hover {
    background-color: var(--primary-light);
    border-color: #f79112;
    transform: translateY(-2px);
}

/* Settings: two-column layout — left = controls, right = preview */
.handwritten-settings {
    margin-top: 30px;
    padding: 25px;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid var(--primary-light);
    border-radius: 12px;
    color: var(--text-primary);
    animation: hw-fadeIn 0.5s ease;
    backdrop-filter: blur(10px);
}

.handwritten-settings-inner {
    display: flex;
    flex-direction: row;
    gap: 32px;
    align-items: flex-start;
}

.handwritten-settings-left {
    flex: 1 1 42%;
    min-width: 0;
    max-width: 420px;
}

.handwritten-settings-right {
    flex: 1 1 52%;
    min-width: 260px;
    display: flex;
    justify-content: center;
    align-items: flex-start;
}

.handwritten-settings-right .preview-style-section {
    margin-top: 0;
    padding-top: 0;
    border-top: none;
    position: sticky;
    top: 100px;
}

.handwritten-settings h3 {
    color: var(--text-primary);
    margin-top: 0;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.3rem;
}

.handwritten-settings h3 i {
    color: #f79112;
}

.settings-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--primary-light);
}

.settings-tab {
    padding: 12px 20px;
    background: rgba(255, 255, 255, 0.03);
    border: 2px solid var(--primary-light);
    border-radius: 10px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    font-size: 0.95rem;
}

.settings-tab:hover {
    color: var(--text-primary);
    border-color: #f79112;
    background: rgba(247, 145, 18, 0.1);
}

.settings-tab.active {
    background: rgba(247, 145, 18, 0.2);
    border-color: #f79112;
    color: #f79112;
}

.settings-tab-content {
    display: none;
}

.settings-tab-content.active {
    display: block;
    animation: hw-fadeIn 0.3s ease;
}

.settings-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 18px;
}

.setting-item {
    display: flex;
    flex-direction: column;
}

.setting-item.full-width {
    grid-column: 1 / -1;
}

.setting-item label {
    margin-bottom: 8px;
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-primary);
}

.setting-select,
.setting-input {
    padding: 10px 12px;
    border: 2px solid var(--primary-light);
    border-radius: 8px;
    font-size: 1rem;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
    transition: all 0.3s ease;
}

.setting-select:focus,
.setting-input:focus {
    outline: none;
    border-color: #f79112;
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 0 3px rgba(247, 145, 18, 0.2);
}

.setting-select option {
    background: var(--primary-dark);
    color: var(--text-primary);
}

.color-input-wrap {
    display: flex;
    align-items: center;
    gap: 12px;
}

.color-input {
    width: 56px;
    height: 40px;
    padding: 2px;
    border-radius: 8px;
    cursor: pointer;
    border: 2px solid var(--primary-light);
    background: rgba(255, 255, 255, 0.05);
}

.color-hex {
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-family: monospace;
}

.ink-color-presets {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.ink-preset {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 2px solid var(--primary-light);
    cursor: pointer;
    padding: 0;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.ink-preset:hover {
    transform: scale(1.12);
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.ink-preset:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(247, 145, 18, 0.4);
}

.setting-range {
    width: 100%;
    margin-top: 5px;
    margin-bottom: 5px;
}

.range-value {
    color: #f79112;
    font-weight: 600;
    font-size: 0.9rem;
    margin-left: 8px;
}

.custom-bg-upload {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.custom-bg-name {
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-style: italic;
}

/* Live style preview */
.preview-style-section {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 2px solid var(--primary-light);
}

.preview-style-section h4 {
    color: var(--text-primary);
    font-size: 1.1rem;
    margin: 0 0 6px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.preview-style-section h4 i {
    color: #f79112;
}

.preview-style-hint {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin: 0 0 12px 0;
}

.preview-style-wrap {
    background: rgba(0,0,0,0.15);
    border-radius: 12px;
    padding: 20px;
    display: inline-block;
    border: 1px solid rgba(255,255,255,0.08);
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.style-preview-canvas {
    display: block;
    width: 252px;
    height: 356px;
    max-width: 100%;
    border-radius: 2px;
    background: #fefefe;
    box-shadow: 0 4px 20px rgba(0,0,0,0.12), 0 1px 3px rgba(0,0,0,0.08);
}

/* Convert section */
.convert-section {
    margin-top: 30px;
    text-align: center;
    animation: hw-fadeIn 0.5s ease;
}

.btn-primary {
    background: var(--accent-color);
    color: white;
    border: none;
    padding: 15px 40px;
    border-radius: 50px;
    cursor: pointer;
    font-size: 1.1rem;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: 0 4px 15px rgba(74, 144, 226, 0.4);
}

.btn-primary:hover {
    transform: translateY(-3px);
    background: #f79112;
    box-shadow: 0 6px 20px rgba(247, 145, 18, 0.6);
}

.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.btn-large {
    padding: 18px 50px;
    font-size: 1.2rem;
}

.progress-container {
    margin-top: 25px;
    animation: hw-fadeIn 0.3s ease;
}

.progress-bar {
    width: 100%;
    height: 30px;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid var(--primary-light);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: inset 0 2px 5px rgba(0,0,0,0.3);
}

.progress-fill {
    height: 100%;
    width: 100%;
    background: linear-gradient(90deg, var(--accent-color) 0%, #f79112 100%);
    border-radius: 15px;
    transform-origin: left;
    transform: scaleX(0);
    will-change: transform;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

@keyframes hw-smoothIndeterminate {
    0% { transform: scaleX(0.15); }
    50% { transform: scaleX(0.75); }
    100% { transform: scaleX(0.15); }
}

.progress-text {
    margin-top: 10px;
    color: var(--text-primary);
    font-weight: 600;
    font-size: 1rem;
}

/* Modal Popup (same style as password remover) */
.pdf-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.65);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    z-index: 9999;
    backdrop-filter: blur(6px);
}

.pdf-modal {
    width: min(560px, 100%);
    background: rgba(15, 20, 25, 0.96);
    border: 2px solid var(--primary-light);
    border-radius: 16px;
    box-shadow: 0 18px 60px rgba(0, 0, 0, 0.6);
    overflow: hidden;
}

.pdf-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 16px 18px;
    background: rgba(255, 255, 255, 0.04);
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.pdf-modal-title {
    margin: 0;
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--text-primary);
}

.pdf-modal-close {
    border: none;
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 6px 8px;
    border-radius: 10px;
    transition: all 0.2s ease;
}

.pdf-modal-close:hover {
    color: #f79112;
    background: rgba(247, 145, 18, 0.12);
}

.pdf-modal-message {
    padding: 16px 18px 0 18px;
    color: var(--text-secondary);
    font-size: 1rem;
    line-height: 1.6;
}

.pdf-modal-actions {
    padding: 16px 18px 18px 18px;
    display: flex;
    justify-content: flex-end;
}

/* Instructions, Features guide & FAQ (reuse site patterns) */
.instructions-section,
.faq-section,
.features-guide-section {
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid var(--primary-light);
    border-radius: 20px;
    padding: 40px;
    box-shadow: var(--shadow-md);
    margin-bottom: 40px;
    backdrop-filter: blur(10px);
}

.features-guide-section h2 {
    color: var(--text-primary);
    font-size: 1.75rem;
    margin-bottom: 20px;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    font-weight: 800;
    flex-wrap: wrap;
}

.features-guide-section h2 i {
    color: #f79112;
}

.features-lead {
    color: var(--text-secondary);
    font-size: 1.05rem;
    line-height: 1.65;
    margin-bottom: 32px;
    text-align: center;
}

.feature-block {
    margin-bottom: 28px;
}

.feature-block h3 {
    color: var(--text-primary);
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 10px;
    line-height: 1.4;
}

.feature-block p {
    color: var(--text-secondary);
    font-size: 1rem;
    line-height: 1.7;
    margin: 0;
}

.features-outro {
    color: var(--text-secondary);
    font-size: 1.05rem;
    line-height: 1.7;
    margin-top: 24px;
    margin-bottom: 0;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.instructions-section h2 {
    color: var(--text-primary);
    font-size: 2rem;
    margin-bottom: 30px;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    font-weight: 800;
    flex-wrap: wrap;
}

.faq-section h2 {
    color: var(--text-primary);
    font-size: 2rem;
    margin-bottom: 30px;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    font-weight: 800;
}

.instructions-section h2 i,
.faq-section h2 i {
    color: #f79112;
}

.steps-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 24px;
}

.step-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 20px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.03);
    border: 2px solid var(--primary-light);
    border-radius: 12px;
    transition: all 0.3s ease;
}

.step-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(247, 145, 18, 0.3);
    border-color: #f79112;
}

.step-number {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #f79112 0%, #ff6b35 100%);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: bold;
    flex-shrink: 0;
}

.step-content h3 {
    color: var(--text-primary);
    margin: 0 0 10px 0;
    font-size: 1.2rem;
    font-weight: 700;
}

.step-content p {
    color: var(--text-secondary);
    margin: 0;
    line-height: 1.6;
    font-size: 0.95rem;
}

.faq-container {
    max-width: 900px;
    margin: 0 auto;
}

.faq-item-pdf {
    margin-bottom: 15px;
    border: 2px solid var(--primary-light);
    border-radius: 8px;
    overflow: hidden;
    background-color: rgba(255, 255, 255, 0.03);
    transition: all 0.3s ease;
}

.faq-item-pdf:hover {
    border-color: #f79112;
}

.faq-question-pdf {
    padding: 15px 15px 15px 40px;
    background-color: rgba(255, 255, 255, 0.05);
    cursor: pointer;
    font-weight: 600;
    color: var(--text-primary);
    position: relative;
    font-size: 1.1em;
    transition: all 0.3s ease;
}

.faq-question-pdf::before {
    content: '+';
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.5em;
    font-weight: normal;
    line-height: 1;
    transition: transform 0.3s ease;
    color: #f79112;
}

.faq-item-pdf.active .faq-question-pdf {
    background-color: rgba(247, 145, 18, 0.2);
    color: var(--text-primary);
    border-bottom: 2px solid #f79112;
}

.faq-item-pdf.active .faq-question-pdf::before {
    content: '-';
    transform: translateY(-50%) rotate(180deg);
}

.faq-answer-pdf {
    background-color: rgba(255, 255, 255, 0.03);
    padding: 0 15px;
    max-height: 0;
    overflow: hidden;
    transition: all 0.5s ease;
}

.faq-item-pdf.active .faq-answer-pdf {
    padding: 15px;
    max-height: 1000px;
}

.faq-answer-pdf p {
    margin: 0;
    font-size: 1.1em;
    line-height: 1.6;
    color: var(--text-secondary);
}

/* ==================== RESPONSIVE (match other tools) ==================== */

/* Tablet: stack settings columns, reduce padding */
@media (max-width: 900px) {
    .handwritten-settings-inner {
        flex-direction: column;
        gap: 24px;
    }

    .handwritten-settings-left {
        max-width: none;
        width: 100%;
    }

    .handwritten-settings-right {
        min-width: 0;
        width: 100%;
        display: flex;
        justify-content: center;
    }

    .handwritten-settings-right .preview-style-section {
        position: static;
        width: 100%;
        max-width: 320px;
        margin-left: auto;
        margin-right: auto;
    }
}

/* 600px: match pdf-compress / pdf-to-image (same font sizes as other tools) */
@media (max-width: 600px) {
    .handwritten-container {
        padding: 14px;
    }

    .upload-section {
        padding: 20px;
    }

    .header-section h1 {
        font-size: 2rem;
        flex-direction: column;
        gap: 10px;
        flex-wrap: wrap;
    }

    .header-section .subtitle {
        font-size: 1rem;
    }

    .drop-zone-pdf {
        padding: 30px 20px;
        min-height: 200px;
    }

    .drop-zone-pdf h3 {
        font-size: 1.2rem;
    }

    .upload-icon i {
        font-size: 3rem;
    }

    .handwritten-settings {
        margin-top: 24px;
        padding: 20px;
    }

    .handwritten-settings h3 {
        font-size: 1.2rem;
        margin-bottom: 16px;
    }

    .settings-tabs {
        flex-wrap: wrap;
        gap: 10px;
        margin-bottom: 16px;
    }

    .settings-tab {
        flex: 1 1 auto;
        min-width: 100px;
        padding: 12px 16px;
        font-size: 0.95rem;
    }

    .settings-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .setting-item label {
        font-size: 0.95rem;
    }

    .preview-style-wrap {
        padding: 16px;
        display: block;
        width: fit-content;
        max-width: 100%;
        margin-left: auto;
        margin-right: auto;
    }

    .style-preview-canvas {
        display: block;
        max-width: 100%;
        height: auto;
        width: 252px;
    }

    .preview-style-section h4 {
        font-size: 1.1rem;
    }

    .preview-style-hint {
        font-size: 0.9rem;
    }

    .preview-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .preview-actions {
        width: 100%;
        display: flex;
        justify-content: flex-end;
    }

    .preview-header h3 {
        font-size: 1.2rem;
    }

    .convert-section {
        margin-top: 24px;
    }

    .btn-large {
        padding: 15px 35px;
        font-size: 1rem;
    }

    .btn-secondary {
        padding: 10px 16px;
        font-size: 0.9rem;
    }

    .instructions-section,
    .faq-section,
    .features-guide-section {
        padding: 30px 20px;
    }

    .instructions-section h2,
    .faq-section h2,
    .features-guide-section h2 {
        font-size: 1.5rem;
        flex-wrap: wrap;
        gap: 10px;
    }

    .steps-container {
        grid-template-columns: 1fr;
    }

    .step-content h3 {
        font-size: 1.2rem;
    }

    .step-content p {
        font-size: 0.95rem;
    }

    .faq-question-pdf {
        padding: 12px 15px 12px 40px;
        font-size: 1rem;
    }

    .faq-question-pdf::before {
        font-size: 1.3em;
        left: 12px;
    }

    .faq-answer-pdf p {
        font-size: 1rem;
    }

    .pdf-modal-overlay {
        padding: 16px;
    }

    .pdf-modal {
        width: 100%;
        max-width: min(560px, calc(100vw - 32px));
    }

    .pdf-modal-message {
        font-size: 1rem;
    }

    .upload-section,
    .handwritten-settings,
    .instructions-section,
    .faq-section,
    .features-guide-section {
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
    }

    /* GPU acceleration for mobile - smooth scrolling and animations */
    .style-preview-canvas {
        transform: translateZ(0);
        -webkit-transform: translateZ(0);
        will-change: transform;
    }

    .preview-style-wrap {
        transform: translateZ(0);
        -webkit-transform: translateZ(0);
    }

    .progress-bar,
    .progress-fill,
    .upload-progress-bar,
    .upload-progress-fill {
        transform: translateZ(0);
        -webkit-transform: translateZ(0);
        will-change: transform;
    }

    .drop-zone-pdf {
        transform: translateZ(0);
        -webkit-transform: translateZ(0);
    }

    .color-input-wrap {
        flex-wrap: wrap;
    }

    .ink-color-presets {
        gap: 8px;
    }
}

/* 480px: match pdf-compress exactly (same “little big” font sizes as other tools) */
@media (max-width: 480px) {
    .handwritten-container {
        padding: 10px;
    }

    .header-section h1 {
        font-size: 1.6rem;
        gap: 10px;
    }

    .header-section .subtitle {
        font-size: 0.95rem;
    }

    .upload-section {
        padding: 15px;
    }

    .drop-zone-pdf {
        padding: 25px 15px;
        min-height: 180px;
    }

    .drop-zone-pdf h3 {
        font-size: 1.25rem;
    }

    .drop-zone-pdf p {
        font-size: 0.9rem;
    }

    .supported-formats small {
        font-size: 0.8rem;
    }

    .handwritten-settings {
        margin-top: 20px;
        padding: 16px;
    }

    .handwritten-settings h3 {
        font-size: 1.1rem;
        margin-bottom: 14px;
    }

    .settings-tab {
        min-width: 0;
        padding: 10px 14px;
        font-size: 0.9rem;
    }

    .setting-item label {
        font-size: 0.95rem;
    }

    .setting-select,
    .setting-input {
        padding: 10px 12px;
        font-size: 1rem;
    }

    .preview-style-wrap {
        padding: 14px;
    }

    .preview-style-section h4 {
        font-size: 1.05rem;
    }

    .preview-header h3 {
        font-size: 1.1rem;
    }

    .preview-next-hint {
        font-size: 0.9rem;
    }

    .convert-section {
        margin-top: 20px;
    }

    .btn-primary {
        padding: 12px 24px;
        font-size: 0.95rem;
    }

    .btn-large {
        width: 100%;
        padding: 15px 25px;
        font-size: 0.95rem;
    }

    .btn-secondary {
        font-size: 0.9rem;
        padding: 8px 14px;
        justify-content: center;
    }

    .preview-actions {
        width: 100%;
        display: flex;
        justify-content: flex-end;
    }

    .preview-actions .btn-secondary {
        width: auto;
    }

    .instructions-section,
    .faq-section,
    .features-guide-section {
        padding: 30px 20px;
    }

    .instructions-section h2,
    .faq-section h2,
    .features-guide-section h2 {
        font-size: 1.5rem;
        gap: 10px;
    }

    .step-number {
        width: 42px;
        height: 42px;
        font-size: 1.25rem;
    }

    .step-content h3 {
        font-size: 1.1rem;
    }

    .step-content p {
        font-size: 0.95rem;
    }

    .faq-question-pdf {
        padding: 12px 15px 12px 45px;
        font-size: 1rem;
    }

    .faq-question-pdf::before {
        font-size: 1.3em;
        left: 12px;
    }

    .faq-answer-pdf p {
        font-size: 1rem;
    }

    .pdf-modal-overlay {
        padding: 12px;
    }

    .pdf-modal {
        max-width: calc(100vw - 24px);
    }

    .pdf-modal-header {
        padding: 12px 14px;
    }

    .pdf-modal-title {
        font-size: 1.05rem;
    }

    .pdf-modal-message {
        padding: 12px 14px 0 14px;
        font-size: 1rem;
    }

    .pdf-modal-actions {
        padding: 12px 14px 14px 14px;
    }

    .pdf-modal-actions .btn-primary {
        width: 100%;
    }

    /* Additional GPU/performance optimizations for very small screens (same as image-to-pdf) */
    .style-preview-canvas {
        backface-visibility: hidden;
        -webkit-backface-visibility: hidden;
    }

    .preview-style-wrap {
        backface-visibility: hidden;
        -webkit-backface-visibility: hidden;
    }
}
