/* PDF-to-Word Converter Specific Styles */

/* ====================
   Workflow Sections
   ==================== */

.workflow-section {
    padding: 40px 20px;
    text-align: center;
    animation: fadeIn 0.5s ease-in;
}

.workflow-section.hidden {
    display: none;
}

.section-subtitle {
    color: #666;
    margin-top: 10px;
    margin-bottom: 30px;
}

/* ====================
   Drag & Drop Zone
   ==================== */

.drag-drop-zone {
    border: 3px dashed #4CAF50;
    border-radius: 16px;
    padding: 60px 40px;
    text-align: center;
    transition: all 0.3s ease;
    background: linear-gradient(135deg, #f8fff9 0%, #e8f5e9 100%);
    cursor: pointer;
}

.drag-drop-zone:hover {
    background: linear-gradient(135deg, #e8f5e9 0%, #d8eed9 100%);
    border-color: #45a049;
    transform: translateY(-2px);
}

.drag-drop-zone.drag-over {
    background: linear-gradient(135deg, #a5d6a7 0%, #81c784 100%);
    border-color: #2e7d32;
    border-width: 4px;
    transform: scale(1.02);
}

.drag-drop-zone i.fa-cloud-arrow-up {
    font-size: 64px;
    color: #4CAF50;
    margin-bottom: 20px;
    display: block;
}

.drag-drop-zone p {
    font-size: 18px;
    color: #333;
    margin-bottom: 20px;
}

.drag-drop-zone .upload-helper-text {
    font-size: 14px;
    color: #666;
    margin-top: 15px;
}

/* Professional Loader Styles */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.95);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.loading-overlay.hidden {
    display: none !important;
    pointer-events: none !important;
    visibility: hidden !important;
    z-index: -1 !important;
}

.loader-stage {
    width: 420px;
    height: 160px;
    position: relative;
    /* Margin removed as flex centering handles it */
}

/* --- 1. Paper Animation --- */
#paper-group {
    transform-origin: 45px 55px;
    animation: paper-entrance 4.5s ease-in-out infinite;
}

@keyframes paper-entrance {
    0% {
        transform: scale(0) translateY(20px);
        opacity: 0;
    }

    10% {
        transform: scale(1.05) translateY(0);
        opacity: 1;
    }

    15% {
        transform: scale(1);
    }

    85% {
        transform: scale(1);
        opacity: 1;
    }

    95% {
        transform: scale(0.95) opacity: 0;
    }

    100% {
        transform: scale(0) opacity: 0;
    }
}

/* --- 2. Pencil Translation (Movement X/Y) --- */
#pencil-wrapper {
    animation: pencil-move 4.5s infinite;
    animation-timing-function: linear;
}

@keyframes pencil-move {
    0% {
        transform: translate(120px, -100px);
        opacity: 0;
    }

    12% {
        transform: translate(35px, 35px);
        opacity: 1;
    }

    15% {
        transform: translate(35px, 35px);
    }

    22% {
        transform: translate(70px, 35px);
    }

    25% {
        transform: translate(45px, 25px);
    }

    28% {
        transform: translate(35px, 46px);
    }

    35% {
        transform: translate(70px, 46px);
    }

    38% {
        transform: translate(45px, 36px);
    }

    41% {
        transform: translate(35px, 57px);
    }

    48% {
        transform: translate(60px, 57px);
    }

    55% {
        transform: translate(150px, 50px);
        opacity: 1;
    }

    60% {
        transform: translate(180px, -50px);
        opacity: 0;
    }

    100% {
        transform: translate(180px, -50px);
        opacity: 0;
    }
}

/* --- 3. Pencil Rotation (Writing Wiggle) --- */
#pencil-body {
    transform-origin: 0 40px;
    animation: pencil-wiggle 4.5s infinite linear;
}

@keyframes pencil-wiggle {

    0%,
    12% {
        transform: rotate(0deg);
    }

    13% {
        transform: rotate(-5deg);
    }

    15% {
        transform: rotate(3deg);
    }

    17% {
        transform: rotate(-5deg);
    }

    19% {
        transform: rotate(3deg);
    }

    21% {
        transform: rotate(-5deg);
    }

    22% {
        transform: rotate(0deg);
    }

    28% {
        transform: rotate(-5deg);
    }

    30% {
        transform: rotate(3deg);
    }

    32% {
        transform: rotate(-5deg);
    }

    34% {
        transform: rotate(3deg);
    }

    35% {
        transform: rotate(0deg);
    }

    41% {
        transform: rotate(-5deg);
    }

    43% {
        transform: rotate(3deg);
    }

    45% {
        transform: rotate(-5deg);
    }

    47% {
        transform: rotate(3deg);
    }

    48% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(0deg);
    }
}

/* --- 4. Shadow Dynamics --- */
#pencil-shadow {
    transform-origin: center;
    opacity: 0.2;
    fill: black;
    animation: shadow-scale 4.5s infinite linear;
}

@keyframes shadow-scale {
    0% {
        transform: translate(120px, -80px) scale(0);
        opacity: 0;
    }

    12% {
        transform: translate(38px, 45px) scale(1);
        opacity: 0.2;
    }

    22% {
        transform: translate(73px, 45px) scale(1);
    }

    25% {
        transform: translate(48px, 45px) scale(0.6);
        opacity: 0.1;
    }

    28% {
        transform: translate(38px, 56px) scale(1);
        opacity: 0.2;
    }

    35% {
        transform: translate(73px, 56px) scale(1);
    }

    38% {
        transform: translate(48px, 56px) scale(0.6);
        opacity: 0.1;
    }

    41% {
        transform: translate(38px, 67px) scale(1);
        opacity: 0.2;
    }

    48% {
        transform: translate(63px, 67px) scale(1);
    }

    55% {
        transform: translate(150px, 60px) scale(0.5);
        opacity: 0;
    }

    100% {
        opacity: 0;
    }
}

/* --- 5. Ink Lines --- */
.ink-line {
    height: 3px;
    rx: 1.5px;
    fill: #94A3B8;
}

#line-1 {
    animation: draw-line-1 4.5s infinite linear;
}

#line-2 {
    animation: draw-line-2 4.5s infinite linear;
}

#line-3 {
    animation: draw-line-3 4.5s infinite linear;
}

@keyframes draw-line-1 {

    0%,
    15% {
        width: 0;
    }

    22% {
        width: 35px;
    }

    90% {
        width: 35px;
        opacity: 1;
    }

    100% {
        width: 35px;
        opacity: 0;
    }
}

@keyframes draw-line-2 {

    0%,
    28% {
        width: 0;
    }

    35% {
        width: 35px;
    }

    90% {
        width: 35px;
        opacity: 1;
    }

    100% {
        width: 35px;
        opacity: 0;
    }
}

@keyframes draw-line-3 {

    0%,
    41% {
        width: 0;
    }

    48% {
        width: 25px;
    }

    90% {
        width: 25px;
        opacity: 1;
    }

    100% {
        width: 25px;
        opacity: 0;
    }
}

/* --- 6. Text Animations --- */
.logo-container {
    animation: logo-rise-blur 4.5s infinite cubic-bezier(0.2, 0.8, 0.2, 1);
    transform-origin: center bottom;
}

@keyframes logo-rise-blur {
    0% {
        opacity: 0;
        transform: translateY(20px) scale(0.95);
        filter: blur(8px);
    }

    10% {
        opacity: 0;
        transform: translateY(15px) scale(0.95);
        filter: blur(8px);
    }

    22% {
        opacity: 1;
        transform: translateY(0) scale(1);
        filter: blur(0);
    }

    85% {
        opacity: 1;
        transform: translateY(0) scale(1);
        filter: blur(0);
    }

    95% {
        opacity: 0;
        transform: translateY(-10px);
        filter: blur(4px);
    }

    100% {
        opacity: 0;
        transform: translateY(-10px);
    }
}

.shimmer-text {
    background: linear-gradient(to right, #94a3b8 20%, #0F3460 50%, #94a3b8 80%);
    background-size: 200% auto;
    color: #000;
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: shimmer-flow 3s linear infinite;
    font-weight: 700;
    letter-spacing: 0.2em;
    text-align: center;
    margin-top: 10px;
}

@keyframes shimmer-flow {
    0% {
        background-position: -200% center;
    }

    100% {
        background-position: 200% center;
    }
}

.loader-subtitle {
    font-size: 0.875rem;
    font-weight: 700;
    text-transform: uppercase;
}

/* ====================
   New Result Workspace
   ==================== */
.workspace-container {
    text-align: center;
    padding: 20px;
    animation: fadeIn 0.5s ease-out;
    position: relative;
    z-index: 10002;
    pointer-events: auto;
}

.workspace-header {
    margin-bottom: 30px;
}

.workspace-header h2 {
    font-size: 28px;
    color: #2b579a;
    /* Word Blue */
    margin-bottom: 10px;
}

.workspace-subtitle {
    color: #4CAF50;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.file-card-professional {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    padding: 30px;
    max-width: 500px;
    margin: 0 auto 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    display: flex;
    align-items: center;
    gap: 20px;
    text-align: left;
    transition: transform 0.3s ease;
}

.file-card-professional:hover {
    transform: translateY(-5px);
}

.word-icon-container {
    background: #f3f6fc;
    padding: 15px;
    border-radius: 12px;
}

.http-file-info h4 {
    font-size: 18px;
    color: #333;
    margin: 0 0 5px 0;
    word-break: break-all;
}

.http-file-info p {
    font-size: 14px;
    color: #666;
    margin: 0;
}

.btn-download-large {
    background: #2b579a;
    /* Word Blue */
    color: white;
    font-size: 18px;
    font-weight: 600;
    padding: 16px 40px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(43, 87, 154, 0.3);
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}

.btn-download-large:hover {
    background: #1e3f72;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(43, 87, 154, 0.4);
}

.download-actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.btn-secondary {
    background: #f5f5f5;
    color: #333;
    border: 2px solid #ddd;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-top: 20px;
    text-decoration: none;
}

.btn-secondary:hover {
    background: #e0e0e0;
    border-color: #ccc;
}

/* ====================
   Animations
   ==================== */

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

    to {
        opacity: 1;
        transform: translateY(0);
    }
}