/* ==================== PDF PASSWORD ADDER (PROTECT) STYLES ==================== */

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

.password-adder-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;
}

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

.subtitle {
    color: var(--text-secondary);
    font-size: 1.2rem;
    margin: 0;
}

/* 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);
    position: relative;
}

.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;
}

.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: bounce 2s infinite;
}

@keyframes 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 {
    margin-top: 15px;
}

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

/* Upload Progress */
.upload-progress-container {
    width: 100%;
    margin-top: 20px;
    animation: 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;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding-right: 10px;
    color: white;
    font-weight: bold;
    font-size: 0.85rem;
}

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

/* Settings section */
.protect-section {
    margin-top: 24px;
    animation: fadeIn 0.4s ease;
}

.protect-grid {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(0, 1.35fr);
    gap: 24px;
}

.settings-card,
.file-info-card {
    background: rgba(15, 20, 25, 0.9);
    border-radius: 14px;
    padding: 18px 20px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

.settings-card h3,
.file-info-card h3 {
    margin: 0 0 12px 0;
    font-size: 1.05rem;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 800;
}

.settings-card h3 i,
.file-info-card h3 i {
    color: #f79112;
}

.setting-group {
    margin-top: 16px;
}

.setting-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--text-primary);
}

.password-input-wrapper {
    position: relative;
}

.setting-input {
    width: 100%;
    padding: 12px 45px 12px 14px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(15, 20, 25, 0.9);
    color: var(--text-primary);
    font-size: 0.95rem;
    transition: all 0.2s ease;
}

.setting-input:focus {
    outline: none;
    border-color: #f79112;
    box-shadow: 0 0 0 1px rgba(247, 145, 18, 0.5);
}

.setting-select {
    width: 100%;
    padding: 12px 14px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(15, 20, 25, 0.9);
    color: var(--text-primary);
    font-size: 0.95rem;
}

.password-toggle {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    border: none;
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 4px;
}

.password-toggle:hover {
    color: #f79112;
}

.password-hint {
    display: block;
    margin-top: 8px;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.password-hint i {
    margin-right: 6px;
    color: #f79112;
}

.strength-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 10px;
}

.strength-meter {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
    width: 210px;
    max-width: 58%;
}

.strength-seg {
    height: 8px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.strength-label {
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-weight: 700;
    white-space: nowrap;
}

.privacy-note {
    margin-top: 18px;
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.04);
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-secondary);
}

.privacy-note i {
    color: #f79112;
}

/* File info */
.file-info-column {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.btn-clear {
    align-self: flex-end;
}

.file-info-card ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.file-info-card li {
    font-size: 0.9rem;
    color: var(--text-secondary);
    display: flex;
    justify-content: space-between;
    gap: 10px;
}

.file-info-card li strong {
    color: var(--text-primary);
    overflow-wrap: anywhere;
    word-break: break-word;
}

/* Actions & progress */
.convert-section {
    margin-top: 22px;
}

.protect-actions {
    display: flex;
    justify-content: center;
}

.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);
    text-align: center;
}

.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;
    width: min(560px, 100%);
    justify-content: center;
}

.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);
}

.progress-container {
    margin-top: 18px;
    animation: 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: 0%;
    background: linear-gradient(90deg, var(--accent-color) 0%, #f79112 100%);
    transition: width 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding-right: 10px;
    color: white;
    font-weight: bold;
    border-radius: 15px;
}

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

/* Modal Popup */
.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 + FAQ (reuse site style) */
.instructions-section,
.faq-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);
}

.instructions-section h2,
.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(2, minmax(0, 1fr));
    gap: 30px;
}

.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;
    background: rgba(255, 255, 255, 0.05);
}

.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;
    box-shadow: 0 4px 15px rgba(247, 145, 18, 0.4);
}

.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;
}

.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: 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);
    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 */
@media (max-width: 900px) {
    .protect-grid {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media (max-width: 600px) {
    .password-adder-container {
        padding: 14px;
    }

    .upload-section {
        padding: 20px;
    }

    .header-section h1 {
        font-size: 2rem;
    }

    .subtitle {
        font-size: 1rem;
    }

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

    .file-info-card li {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }
    
    /* GPU Acceleration for mobile - force hardware acceleration */
    .drop-zone-pdf,
    .protect-section,
    .settings-card,
    .file-info-card {
        transform: translateZ(0);
        -webkit-transform: translateZ(0);
        will-change: transform;
    }
    
    /* Disable expensive backdrop-filter on mobile for performance */
    .upload-section,
    .instructions-section,
    .faq-section,
    .pdf-modal-overlay {
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
    }
    
    /* Adjust background since backdrop-filter is removed */
    .upload-section,
    .instructions-section,
    .faq-section {
        background: rgba(255, 255, 255, 0.08);
    }
}

@media (max-width: 480px) {
    .header-section h1 {
        font-size: 1.6rem;
        gap: 10px;
    }

    .subtitle {
        font-size: 0.95rem;
    }

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

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

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

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

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

    .faq-answer-pdf p {
        font-size: 1rem;
    }
    
    /* Additional GPU acceleration for very small screens */
    .step-item,
    .faq-item-pdf {
        backface-visibility: hidden;
        -webkit-backface-visibility: hidden;
    }
    
    /* Force GPU layer for buttons and inputs */
    .btn-primary,
    .btn-secondary,
    .setting-input,
    .setting-select {
        transform: translateZ(0);
        -webkit-transform: translateZ(0);
    }
    
    /* Password strength meter GPU acceleration */
    .strength-meter,
    .strength-seg {
        transform: translateZ(0);
        -webkit-transform: translateZ(0);
    }
}

