/* General Styles */
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    margin: 0;
    padding: 0;
    line-height: 1.6;
    color: #333;
    background-color: #f9f9f9;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Header */
header {
    background: linear-gradient(to right, #3b82f6, #4f46e5);
    color: #fff;
    text-align: center;
    padding: 40px 0;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
}

header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTAwJSIgaGVpZ2h0PSIxMDAlIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjxkZWZzPjxwYXR0ZXJuIGlkPSJwYXR0ZXJuIiB4PSIwIiB5PSIwIiB3aWR0aD0iNDAiIGhlaWdodD0iNDAiIHBhdHRlcm5Vbml0cz0idXNlclNwYWNlT25Vc2UiIHBhdHRlcm5UcmFuc2Zvcm09InJvdGF0ZSgzMCkiPjxyZWN0IHg9IjAiIHk9IjAiIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCIgZmlsbD0icmdiYSgyNTUsMjU1LDI1NSwwLjAzKSI+PC9yZWN0PjwvcGF0dGVybj48L2RlZnM+PHJlY3QgeD0iMCIgeT0iMCIgd2lkdGg9IjEwMCUiIGhlaWdodD0iMTAwJSIgZmlsbD0idXJsKCNwYXR0ZXJuKSI+PC9yZWN0Pjwvc3ZnPg==');
    opacity: 0.2;
    z-index: 1;
}

header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    position: relative;
    z-index: 2;
    font-weight: 700;
}

header p {
    font-size: 1.2rem;
    margin: 0;
    position: relative;
    z-index: 2;
    max-width: 600px;
    margin: 0 auto;
}

/* Ad Containers */
.ad-container {
    max-width: 300px;
    height: 50px;
    margin: 20px auto;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 10px;
}

.header-ad {
    margin-top: 20px;
    position: relative;
    z-index: 2;
}

.footer-ad {
    margin-bottom: 20px;
}
/* File Upload Section */
#upload-section {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    padding: 30px;
    margin: 20px 0;
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
}

#upload-section:hover {
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

/* Uploaded Files Container */
#uploaded-files {
    margin-top: 20px;
    text-align: left;
    background: #f8fafc;
    border-radius: 10px;
    padding: 15px;
}

.uploaded-file {
    background: #f3f4f6;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border: 1px solid #e5e7eb;
    transition: all 0.2s ease;
}

.uploaded-file:hover {
    background: #eff6ff;
    border-color: #bfdbfe;
}

.uploaded-file i {
    color: #3b82f6;
    cursor: pointer;
    padding: 6px;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.uploaded-file i:hover {
    color: #1d4ed8;
    background: rgba(59, 130, 246, 0.1);
}

#drop-area {
    border: 2px dashed #3b82f6;
    border-radius: 16px;
    padding: 40px;
    margin: 20px auto;
    max-width: 500px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #f0f9ff;
}

#drop-area.dragover {
    border-color: #2563eb;
    background: rgba(59, 130, 246, 0.05);
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.2);
}

#drop-area:hover {
    border-color: #2563eb;
    background: rgba(59, 130, 246, 0.05);
}

#drop-area i {
    font-size: 3rem;
    color: #3b82f6;
    margin-bottom: 16px;
    transition: transform 0.3s ease;
}

#drop-area:hover i {
    transform: translateY(-5px);
}

#drop-area p {
    font-size: 1.1rem;
    margin: 0;
    color: #4b5563;
}

#browse-link {
    color: #3b82f6;
    font-weight: 600;
    cursor: pointer;
    position: relative;
    transition: all 0.2s ease;
}

#browse-link:hover {
    color: #1d4ed8;
    text-decoration: underline;
}

#file-input {
    display: none;
}

/* Progress Bar */
#progress-bar {
    width: 100%;
    background: #f3f4f6;
    margin: 24px auto;
    max-width: 500px;
    height: 10px;
    border-radius: 10px;
    overflow: hidden;
    position: relative;
}

#progress {
    width: 0%;
    height: 100%;
    background: linear-gradient(to right, #3b82f6, #4f46e5);
    transition: width 0.3s ease;
    border-radius: 10px;
}

#progress-bar.complete #progress {
    background: #22c55e;
}

#progress-bar.complete::after {
    content: 'Conversion Complete!';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #166534;
    font-size: 12px;
    font-weight: 600;
}

/* Conversion Options Section */
#conversion-options {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
    margin: 20px 0;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    margin: 12px;
    background: linear-gradient(to right, #3b82f6, #4f46e5);
    color: #fff;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(59, 130, 246, 0.25);
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.7s ease;
}

.btn:hover::before {
    left: 100%;
}

.btn:disabled {
    background: #e5e7eb;
    color: #9ca3af;
    box-shadow: none;
    cursor: not-allowed;
}

.btn i {
    margin-right: 10px;
    font-size: 1.1em;
}

.btn:hover:not(:disabled) {
    background: linear-gradient(to right, #2563eb, #4338ca);
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(59, 130, 246, 0.35);
}

.btn:active:not(:disabled) {
    transform: translateY(1px);
    box-shadow: 0 2px 4px rgba(59, 130, 246, 0.2);
}

/* Footer */
footer {
    background: #1f2937;
    color: #fff;
    text-align: center;
    padding: 30px 0;
    margin-top: 60px;
    position: relative;
}

footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(to right, #3b82f6, #4f46e5);
}

footer p {
    margin: 0;
    font-size: 0.95rem;
    color: #e5e7eb;
}

/* Add animation classes */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from { transform: translateY(20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.animate-fade-in {
    animation: fadeIn 0.5s ease-out forwards;
}

.animate-slide-up {
    animation: slideUp 0.5s ease-out forwards;
}

.animate-pulse {
    animation: pulse 2s infinite;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    header h1 {
        font-size: 2rem;
    }
    
    header p {
        font-size: 1rem;
    }
    
    #drop-area {
        padding: 30px 20px;
    }
    
    .btn {
        padding: 10px 16px;
        font-size: 0.9rem;
    }
    
    #conversion-options {
        flex-direction: column;
        align-items: center;
    }
    
    .btn {
        width: 80%;
        margin: 5px 0;
    }
}

@media (max-width: 480px) {
    .container {
        width: 95%;
        padding: 10px;
    }
    
    header {
        padding: 30px 0;
    }
    
    header h1 {
        font-size: 1.8rem;
    }
    
    #upload-section {
        padding: 20px 15px;
    }
    
    .btn {
        width: 100%;
        margin: 5px 0;
    }
}


/* PDF Page Break Improvements */
/* Ensure images don't break across pages */
img {
    page-break-inside: avoid;
    max-width: 100%;
    height: auto;
}

/* Prevent headings from being separated from their content */
h1, h2, h3, h4, h5, h6 {
    page-break-after: avoid;
    page-break-inside: avoid;
}

/* Keep paragraphs together better */
p {
    orphans: 3; /* Minimum lines at bottom of page */
    widows: 3;  /* Minimum lines at top of page */
}

/* Prevent tables from breaking across pages */
table {
    page-break-inside: avoid;
}

/* For long content that shouldn't be broken */
.no-break {
    page-break-inside: avoid;
}