/**
 * PdfToWord.css - PDF to Word Converter Styles
 * Basic Calculator Online
 */

/* ======================= PAGE HEADER ======================= */
.page-header {
    position: relative;
    padding: 6rem 0 3rem;
    background: linear-gradient(135deg, #4f46e5 0%, #6366f1 50%, #818cf8 100%);
    overflow: hidden;
}

.page-header-bg {
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.page-header-content {
    position: relative;
    z-index: 2;
}

.page-header .breadcrumb {
    background: transparent;
    padding: 0;
    margin-bottom: 1rem;
}

.page-header .breadcrumb-item a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
}

.page-header .breadcrumb-item a:hover {
    color: #fff;
}

.page-header .breadcrumb-item.active {
    color: rgba(255, 255, 255, 0.9);
}

.page-header .breadcrumb-item + .breadcrumb-item::before {
    color: rgba(255, 255, 255, 0.5);
}

.page-title {
    font-size: 2.5rem;
    font-weight: 800;
    color: #fff;
    margin-bottom: 0.5rem;
}

.page-subtitle {
    font-size: 1.125rem;
    color: rgba(255, 255, 255, 0.9);
    margin: 0;
}

/* ======================= CONVERTER SECTION ======================= */
.pdf-converter-section {
    padding: 4rem 0;
    background: linear-gradient(180deg, #f8fafc 0%, #ffffff 100%);
}

.pdf-converter-card {
    background: #fff;
    border-radius: 1.5rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    min-height: 400px;
}

/* ======================= LOADING STATE ======================= */
.loading-libraries {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem 2rem;
    text-align: center;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #e2e8f0;
    border-top-color: #6366f1;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 1rem;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.loading-libraries p {
    color: var(--text-secondary);
    font-size: 1rem;
}

/* ======================= UPLOAD AREA ======================= */
.pdf-upload-area {
    padding: 2rem;
}

.upload-zone {
    border: 2px dashed #d1d5db;
    border-radius: 1rem;
    padding: 4rem 2rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #fafafa;
}

.upload-zone:hover,
.upload-zone.dragover {
    border-color: #6366f1;
    background: rgba(99, 102, 241, 0.05);
}

.upload-icon {
    position: relative;
    width: 100px;
    height: 100px;
    margin: 0 auto 1.5rem;
}

.upload-icon > i {
    font-size: 4rem;
    color: #ef4444;
}

.upload-arrow {
    position: absolute;
    bottom: -5px;
    right: -5px;
    width: 32px;
    height: 32px;
    background: #6366f1;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-8px); }
    60% { transform: translateY(-4px); }
}

.upload-zone h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.upload-zone p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.upload-btn {
    background: linear-gradient(135deg, #4f46e5 0%, #6366f1 100%);
    color: #fff;
    border: none;
    padding: 0.875rem 2rem;
    border-radius: 0.75rem;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.upload-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(99, 102, 241, 0.3);
}

.upload-info {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-top: 2rem;
    flex-wrap: wrap;
}

.upload-info span {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: var(--text-muted);
}

.upload-info i {
    color: #6366f1;
}

/* ======================= PROCESSING AREA ======================= */
.pdf-processing-area {
    padding: 2rem;
}

.pdf-file-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem;
    background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
    border-radius: 1rem;
    margin-bottom: 2rem;
}

.file-icon {
    width: 60px;
    height: 60px;
    background: #ef4444;
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.file-icon i {
    font-size: 1.75rem;
    color: #fff;
}

.file-details {
    flex: 1;
    min-width: 0;
}

.file-name {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 0.25rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.file-meta {
    color: var(--text-muted);
    font-size: 0.875rem;
    margin: 0;
}

.file-meta .separator {
    margin: 0 0.5rem;
}

.file-remove-btn {
    width: 40px;
    height: 40px;
    border: none;
    background: rgba(239, 68, 68, 0.1);
    border-radius: 0.5rem;
    color: #ef4444;
    cursor: pointer;
    transition: all 0.2s;
}

.file-remove-btn:hover {
    background: #ef4444;
    color: #fff;
}

/* ======================= OPTIONS ======================= */
.pdf-options {
    margin-bottom: 2rem;
}

.pdf-options h5 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.options-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
}

.option-label {
    cursor: pointer;
    display: block;
}

.option-label input {
    display: none;
}

.option-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1.25rem;
    background: #f8fafc;
    border: 2px solid #e2e8f0;
    border-radius: 0.75rem;
    transition: all 0.3s ease;
    text-align: center;
}

.option-card:hover {
    border-color: #6366f1;
}

.option-label input:checked + .option-card {
    border-color: #6366f1;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, rgba(129, 140, 248, 0.1) 100%);
}

.option-card i {
    font-size: 2rem;
    color: #2563eb;
    margin-bottom: 0.5rem;
}

.option-name {
    font-weight: 700;
    color: var(--text-primary);
    display: block;
}

.option-desc {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* Advanced Options */
.advanced-options {
    margin-top: 1.5rem;
}

.advanced-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.875rem 1.25rem;
    background: #f8fafc;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: all 0.2s;
}

.advanced-toggle:hover {
    background: #f1f5f9;
}

.advanced-toggle span {
    font-weight: 600;
    color: var(--text-secondary);
}

.advanced-toggle i {
    transition: transform 0.3s;
}

.advanced-toggle.active i {
    transform: rotate(180deg);
}

.advanced-content {
    display: none;
    padding: 1.25rem;
    background: #f8fafc;
    border-radius: 0 0 0.5rem 0.5rem;
    margin-top: -0.25rem;
}

.advanced-content.show {
    display: block;
}

.advanced-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.checkbox-option {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.75rem;
    background: #fff;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: all 0.2s;
}

.checkbox-option:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.checkbox-option input {
    display: none;
}

.checkmark {
    width: 20px;
    height: 20px;
    border: 2px solid #d1d5db;
    border-radius: 0.25rem;
    flex-shrink: 0;
    position: relative;
    transition: all 0.2s;
    margin-top: 2px;
}

.checkbox-option input:checked + .checkmark {
    background: #6366f1;
    border-color: #6366f1;
}

.checkbox-option input:checked + .checkmark::after {
    content: '';
    position: absolute;
    left: 5px;
    top: 1px;
    width: 6px;
    height: 10px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.checkbox-text strong {
    display: block;
    font-size: 0.875rem;
    color: var(--text-primary);
}

.checkbox-text small {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* ======================= CONVERT ACTION ======================= */
.pdf-convert-action {
    text-align: center;
    padding-top: 1rem;
}

.convert-btn {
    background: linear-gradient(135deg, #4f46e5 0%, #6366f1 100%);
    color: #fff;
    border: none;
    padding: 1rem 3rem;
    border-radius: 0.75rem;
    font-weight: 600;
    font-size: 1.125rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.convert-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(99, 102, 241, 0.3);
}

.convert-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* ======================= PROGRESS AREA ======================= */
.pdf-progress-area {
    padding: 4rem 2rem;
    text-align: center;
}

.progress-content {
    max-width: 400px;
    margin: 0 auto;
}

.progress-spinner {
    position: relative;
    width: 100px;
    height: 100px;
    margin: 0 auto 2rem;
}

.spinner-ring {
    position: absolute;
    inset: 0;
    border: 4px solid #e2e8f0;
    border-top-color: #6366f1;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.spinner-icon {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.spinner-icon i {
    font-size: 2rem;
    color: #2563eb;
}

.progress-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.progress-status {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.progress-bar-container {
    height: 8px;
    background: #e2e8f0;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 0.75rem;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #4f46e5, #6366f1, #818cf8);
    border-radius: 4px;
    transition: width 0.3s ease;
}

.progress-percent {
    font-weight: 600;
    color: #6366f1;
}

/* ======================= SUCCESS AREA ======================= */
.pdf-success-area {
    padding: 4rem 2rem;
    text-align: center;
}

.success-content {
    max-width: 500px;
    margin: 0 auto;
}

.success-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #dcfce7 0%, #bbf7d0 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
}

.success-icon i {
    font-size: 2.5rem;
    color: #22c55e;
}

.success-content h3 {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.success-message {
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.converted-file-info {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    padding: 1rem 1.5rem;
    background: #f8fafc;
    border-radius: 0.75rem;
    margin-bottom: 2rem;
}

.converted-file-info > i {
    font-size: 2rem;
    color: #2563eb;
}

.converted-details {
    text-align: left;
}

.converted-name {
    display: block;
    font-weight: 600;
    color: var(--text-primary);
}

.converted-size {
    font-size: 0.875rem;
    color: var(--text-muted);
}

.success-actions {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.download-btn {
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
    color: #fff;
    border: none;
    padding: 1rem 2rem;
    border-radius: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.download-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(34, 197, 94, 0.3);
}

.convert-another-btn {
    background: #fff;
    color: #6366f1;
    border: 2px solid #6366f1;
    padding: 1rem 2rem;
    border-radius: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.convert-another-btn:hover {
    background: rgba(99, 102, 241, 0.05);
}

/* ======================= ERROR AREA ======================= */
.pdf-error-area {
    padding: 4rem 2rem;
    text-align: center;
}

.error-content {
    max-width: 400px;
    margin: 0 auto;
}

.error-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #fef2f2 0%, #fecaca 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
}

.error-icon i {
    font-size: 2.5rem;
    color: #ef4444;
}

.error-content h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.error-message {
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.try-again-btn {
    background: linear-gradient(135deg, #4f46e5 0%, #6366f1 100%);
    color: #fff;
    border: none;
    padding: 1rem 2rem;
    border-radius: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.try-again-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(99, 102, 241, 0.3);
}

/* ======================= INFO CARDS ======================= */
.pdf-info-card {
    background: #fff;
    border-radius: 1rem;
    padding: 2rem;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    height: 100%;
    transition: all 0.3s ease;
}

.pdf-info-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.info-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
}

.info-icon.blue {
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
}

.info-icon.blue i {
    color: #2563eb;
}

.info-icon.green {
    background: linear-gradient(135deg, #dcfce7 0%, #bbf7d0 100%);
}

.info-icon.green i {
    color: #22c55e;
}

.info-icon.purple {
    background: linear-gradient(135deg, #f3e8ff 0%, #e9d5ff 100%);
}

.info-icon.purple i {
    color: #9333ea;
}

.info-icon i {
    font-size: 1.5rem;
}

.pdf-info-card h5 {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.pdf-info-card p {
    color: var(--text-secondary);
    font-size: 0.9375rem;
    margin: 0;
    line-height: 1.5;
}

/* ======================= HOW TO SECTION ======================= */
.pdf-howto-section {
    padding: 5rem 0;
    background: #fff;
}

.pdf-section-badge {
    display: inline-flex;
    align-items: center;
    background: rgba(99, 102, 241, 0.1);
    color: #6366f1;
    padding: 0.5rem 1rem;
    border-radius: 2rem;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.section-title {
    font-size: 2rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.section-desc {
    color: var(--text-secondary);
    font-size: 1.0625rem;
}

.howto-card {
    background: #f8fafc;
    border-radius: 1rem;
    padding: 2rem;
    text-align: center;
    position: relative;
    height: 100%;
}

.howto-step {
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 30px;
    height: 30px;
    background: linear-gradient(135deg, #4f46e5 0%, #6366f1 100%);
    color: #fff;
    border-radius: 50%;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}

.howto-icon {
    width: 70px;
    height: 70px;
    background: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0.5rem auto 1.5rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

.howto-icon i {
    font-size: 1.75rem;
    color: #6366f1;
}

.howto-card h5 {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.howto-card p {
    color: var(--text-secondary);
    font-size: 0.9375rem;
    margin: 0;
}

/* ======================= FEATURES SECTION ======================= */
.pdf-features-section {
    padding: 5rem 0;
    background: #f8fafc;
}

.features-list {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.feature-item {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.feature-check {
    width: 28px;
    height: 28px;
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.feature-check i {
    color: #fff;
    font-size: 0.875rem;
}

.feature-text h6 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 0.25rem;
}

.feature-text p {
    font-size: 0.9375rem;
    color: var(--text-secondary);
    margin: 0;
}

.features-illustration {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    padding: 3rem;
}

.illustration-card {
    width: 140px;
    height: 180px;
    border-radius: 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.illustration-card.pdf {
    background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
}

.illustration-card.pdf i {
    font-size: 3.5rem;
    color: #ef4444;
}

.illustration-card.word {
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
}

.illustration-card.word i {
    font-size: 3.5rem;
    color: #2563eb;
}

.illustration-card span {
    font-weight: 700;
    font-size: 0.875rem;
    color: var(--text-primary);
}

.illustration-arrow {
    font-size: 2rem;
    color: #6366f1;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* ======================= RESPONSIVE ======================= */
@media (max-width: 991.98px) {
    .page-title {
        font-size: 2rem;
    }

    .options-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .features-illustration {
        padding: 2rem;
    }
}

@media (max-width: 767.98px) {
    .page-header {
        padding: 5rem 0 2.5rem;
    }

    .page-title {
        font-size: 1.75rem;
    }

    .upload-zone {
        padding: 2.5rem 1.5rem;
    }

    .upload-info {
        flex-direction: column;
        gap: 0.75rem;
    }

    .options-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .success-actions {
        flex-direction: column;
    }

    .success-actions button {
        width: 100%;
    }

    .features-illustration {
        flex-direction: column;
        gap: 1.5rem;
    }

    .illustration-arrow {
        transform: rotate(90deg);
    }

    .illustration-card {
        width: 120px;
        height: 150px;
    }
}

@media (max-width: 575.98px) {
    .pdf-converter-section {
        padding: 2rem 0;
    }

    .pdf-upload-area,
    .pdf-processing-area {
        padding: 1rem;
    }

    .pdf-file-info {
        flex-wrap: wrap;
    }

    .file-details {
        flex: 1 1 calc(100% - 80px);
    }

    .advanced-grid {
        grid-template-columns: 1fr;
    }

    .convert-btn {
        width: 100%;
    }
}