/* Custom CSS for PDF Tools */

:root {
    --primary-color: #6366f1;
    --secondary-color: #8b5cf6;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    --dark-color: #1f2937;
    --light-color: #f9fafb;
    --accent-color: #06b6d4;
    --gradient-start: #0f172a;
    --gradient-end: #1e1b4b;
    --card-bg: rgba(255, 255, 255, 0.1);
    --card-border: rgba(255, 255, 255, 0.2);
}

body {
    font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
    background: linear-gradient(135deg, var(--gradient-start) 0%, var(--gradient-end) 50%, #312e81 100%);
    background-attachment: fixed;
    min-height: 100vh;
    color: white;
    line-height: 1.6;
}

/* Navigation */
.navbar {
    background: rgba(15, 23, 42, 0.9) !important;
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.5rem;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color), var(--primary-color));
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradientShift 3s ease-in-out infinite;
    transition: all 0.3s ease;
}

.navbar-brand:hover {
    transform: scale(1.05);
}

@keyframes gradientShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.navbar-nav .nav-link {
    font-weight: 500;
    transition: all 0.3s ease;
    color: rgba(255, 255, 255, 0.8) !important;
    position: relative;
}

.navbar-nav .nav-link:hover {
    color: #fff !important;
    transform: translateY(-2px);
}

.navbar-nav .nav-link:hover::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 2px;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    border-radius: 1px;
}

/* Feature Cards */
.feature-card {
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    border: 1px solid var(--card-border);
    border-radius: 20px;
    overflow: hidden;
    background: var(--card-bg);
    backdrop-filter: blur(20px);
    position: relative;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
}

.feature-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.3);
    border-color: rgba(255, 255, 255, 0.3);
}

.feature-icon {
    font-size: 3.5rem;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1rem;
    filter: drop-shadow(0 4px 8px rgba(99, 102, 241, 0.3));
}

.feature-card:nth-child(2) .feature-icon {
    background: linear-gradient(135deg, var(--success-color), #34d399);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0 4px 8px rgba(16, 185, 129, 0.3));
}

.feature-card:nth-child(3) .feature-icon {
    background: linear-gradient(135deg, var(--warning-color), #fbbf24);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0 4px 8px rgba(245, 158, 11, 0.3));
}

/* Upload Area */
.upload-area {
    border: 2px dashed rgba(255, 255, 255, 0.3);
    border-radius: 20px;
    padding: 3rem 2rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    position: relative;
}

.upload-area::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 20px;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(139, 92, 246, 0.1));
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: -1;
}

.upload-area:hover {
    border-color: var(--primary-color);
    background: rgba(99, 102, 241, 0.1);
    transform: scale(1.02) translateY(-5px);
    box-shadow: 0 15px 35px rgba(99, 102, 241, 0.2);
}

.upload-area:hover::before {
    opacity: 1;
}

.upload-area.dragover {
    border-color: var(--success-color);
    background: rgba(16, 185, 129, 0.1);
    transform: scale(1.05);
    box-shadow: 0 20px 40px rgba(16, 185, 129, 0.3);
}

.upload-content h5 {
    color: white;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.upload-content p {
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 0;
}

.upload-content small {
    color: rgba(255, 255, 255, 0.6);
}



/* Buttons */
.btn {
    border-radius: 12px;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    border: none;
    position: relative;
    overflow: hidden;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 0.875rem;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(99, 102, 241, 0.5);
    background: linear-gradient(135deg, #5a67d8, var(--primary-color));
}

.btn-success {
    background: linear-gradient(135deg, var(--success-color), #34d399);
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.4);
}

.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(16, 185, 129, 0.5);
    background: linear-gradient(135deg, #059669, var(--success-color));
}

.btn-warning {
    background: linear-gradient(135deg, var(--warning-color), #fbbf24);
    box-shadow: 0 4px 15px rgba(245, 158, 11, 0.4);
    color: #000 !important;
}

.btn-warning:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(245, 158, 11, 0.5);
    background: linear-gradient(135deg, #d97706, var(--warning-color));
    color: #000 !important;
}

.btn-outline-secondary {
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: white;
    background: transparent;
}

.btn-outline-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.5);
    color: white;
    transform: translateY(-2px);
}

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

.btn:hover::before {
    left: 100%;
}

.btn-lg {
    padding: 1rem 2.5rem;
    font-size: 1rem;
}

/* Cards */
.card {
    border: 1px solid var(--card-border);
    border-radius: 20px;
    overflow: hidden;
    background: var(--card-bg);
    backdrop-filter: blur(20px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    position: relative;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
}

.card-header {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.05);
}

.card-body {
    padding: 2rem;
}

.shadow {
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.25) !important;
}



/* Alerts */
.alert {
    border: none;
    border-radius: 10px;
    backdrop-filter: blur(10px);
}

.alert-info {
    background: rgba(6, 182, 212, 0.15);
    border: 1px solid rgba(6, 182, 212, 0.3);
    color: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border-radius: 15px;
}

.alert-info h5 {
    color: white !important;
    font-weight: 600;
}

.alert-info .list-unstyled li {
    color: rgba(255, 255, 255, 0.9) !important;
    margin-bottom: 0.5rem;
}

.alert-warning {
    background: rgba(255, 193, 7, 0.1);
    border: 1px solid rgba(255, 193, 7, 0.2);
    color: #664d03;
}

/* Form Controls */
.form-control {
    border-radius: 8px;
    border: 1px solid #dee2e6;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}

.form-check-input:checked {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}



/* File Info Display */
.file-info {
    background: rgba(99, 102, 241, 0.15);
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-radius: 12px;
    padding: 1rem;
    margin-top: 0.5rem;
    backdrop-filter: blur(10px);
}

.file-info .file-name {
    font-weight: 600;
    color: white;
}

.file-info .file-size {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.7);
}

/* Progress Bar */
.progress {
    height: 8px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    overflow: hidden;
}

.progress-bar {
    border-radius: 10px;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    position: relative;
}

.progress-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* Compression Options */
.compression-option {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 1rem;
    margin-bottom: 1rem;
    transition: all 0.3s ease;
    cursor: pointer;
    text-align: center;
}

.compression-option:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.compression-option .form-check {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    justify-content: center;
    gap: 0.5rem;
}

.compression-option .form-check-input {
    margin-top: 0.3rem;
    position: relative;
    margin-left: 0;
    flex-shrink: 0;
}

.compression-option .form-check-label {
    text-align: center;
    cursor: pointer;
    line-height: 1.5;
}

/* Desktop alignment for compression labels */
@media (min-width: 768px) {
    .compression-option .form-check-label.text-white {
        margin-top: -20px;
    }
}

/* Clear button styling */
.btn-warning {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    border: none;
    color: white;
    transition: all 0.3s ease;
}

.btn-warning:hover {
    background: linear-gradient(135deg, #d97706, #b45309);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(245, 158, 11, 0.4);
}

.btn-warning:active {
    transform: translateY(0);
    box-shadow: 0 4px 15px rgba(245, 158, 11, 0.3);
}

/* Clear message styling */
#clearMessage {
    min-height: 20px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

#clearMessage small {
    font-weight: 500;
    opacity: 0;
    animation: fadeIn 0.3s ease forwards;
}

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

#clearMessage .text-success {
    color: #10b981 !important;
}

#clearMessage .text-danger {
    color: #ef4444 !important;
}

/* Merge file reorder buttons */
.file-info {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 0.75rem;
    transition: all 0.3s ease;
    cursor: move;
    user-select: none;
}

.file-info:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
}

.file-info.dragging {
    opacity: 0.5;
    transform: rotate(2deg);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.file-info.drag-over {
    border-color: #f59e0b;
    background: rgba(245, 158, 11, 0.1);
}

.move-up, .move-down {
    min-width: 32px;
    height: 32px;
    padding: 0;
    border-radius: 6px;
    transition: all 0.2s ease;
    background: linear-gradient(135deg, #f59e0b, #d97706);
    border: 1px solid #d97706;
    color: white;
}

.move-up:hover:not(:disabled), .move-down:hover:not(:disabled) {
    background: linear-gradient(135deg, #d97706, #b45309);
    border-color: #b45309;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
}

.move-up:disabled, .move-down:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    background: #6b7280;
    border-color: #6b7280;
}

/* Remove file button */
.btn-outline-danger.btn-sm {
    min-width: 32px;
    height: 32px;
    padding: 0;
    border-radius: 6px;
    transition: all 0.2s ease;
    border-color: #dc3545;
    color: #dc3545;
}

.btn-outline-danger.btn-sm:hover {
    background: #dc3545;
    border-color: #dc3545;
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(220, 53, 69, 0.3);
}

/* Add more files button */
.btn-outline-primary {
    border-radius: 12px;
    padding: 8px 16px;
    font-weight: 500;
    transition: all 0.3s ease;
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.btn-outline-primary:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(99, 102, 241, 0.3);
}

/* Clear button for split page */
.btn-outline-danger.btn-lg {
    border-radius: 12px;
    font-weight: 600;
    transition: all 0.3s ease;
    border: 2px solid #dc3545;
    color: #ffffff;
    background: linear-gradient(135deg, #dc3545, #c82333);
    backdrop-filter: blur(10px);
}

.btn-outline-danger.btn-lg:hover {
    background: linear-gradient(135deg, #dc3545, #c82333);
    border-color: #c82333;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(220, 53, 69, 0.4);
}

.btn-outline-danger.btn-lg:focus {
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25);
    border-color: #dc3545;
}

.btn-outline-danger.btn-lg:active {
    background: linear-gradient(135deg, #c82333, #bd2130);
    border-color: #bd2130;
    transform: translateY(0);
}

.file-name {
    font-weight: 500;
    color: white;
    margin-bottom: 0.25rem;
    display: flex;
    align-items: center;
}

.file-name .fa-grip-vertical {
    color: #f59e0b;
    cursor: grab;
    opacity: 0.7;
    transition: all 0.2s ease;
}

.file-name .fa-grip-vertical:hover {
    opacity: 1;
    transform: scale(1.1);
}

.file-info:active .fa-grip-vertical {
    cursor: grabbing;
}

.file-size {
    font-size: 0.875rem;
    color: #9ca3af;
}

.file-pages {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.875rem;
    margin-top: 0.25rem;
    font-weight: 500;
}

.file-pages i {
    margin-right: 0.5rem;
}

/* Page number badge with warning color */
.badge.bg-primary {
    background: linear-gradient(135deg, #f59e0b, #d97706) !important;
    color: white;
    font-weight: 600;
    min-width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
}

.compression-option .form-check-input:checked + .form-check-label {
    color: var(--primary-color) !important;
}

.compression-option .form-check-input:checked {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.form-check-label strong {
    display: block;
    margin-bottom: 0.25rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container-fluid {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    .feature-icon {
        font-size: 2rem;
    }
    
    .upload-area {
        padding: 2rem 1rem;
    }
    
    .card-body {
        padding: 1.5rem;
    }
    
    .display-4 {
        font-size: 2rem;
    }
}

/* Loading Animation */
.loading {
    position: relative;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Hover Effects */
.nav-link, .btn, .card {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Homepage specific styles */
.display-4 {
    background: linear-gradient(135deg, #ffffff, #e2e8f0);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 800;
    text-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.lead {
    color: rgba(255, 255, 255, 0.9) !important;
    font-weight: 400;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.card-title {
    color: white !important;
    font-weight: 700;
}

.card-text {
    color: rgba(255, 255, 255, 0.8) !important;
}

.text-muted {
    color: rgba(255, 255, 255, 0.7) !important;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: #0056b3;
}

/* Global Popup Modal Styles */
#globalPopup .modal-content {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.08));
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    box-shadow: 
        0 20px 40px rgba(0, 0, 0, 0.3),
        0 8px 16px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    overflow: hidden;
}

#globalPopup .modal-header {
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.3), rgba(139, 92, 246, 0.3));
    color: white;
}

#globalPopup .modal-body {
    color: white;
    background: transparent;
}

#globalPopup .modal-footer {
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    background: rgba(255, 255, 255, 0.05);
}

#globalPopup .btn-close {
    filter: invert(1);
    opacity: 0.8;
}

#globalPopup .btn-close:hover {
    opacity: 1;
}

/* Modal backdrop */
#globalPopup .modal-backdrop {
    background-color: rgba(0, 0, 0, 0.7);
}

/* Success popup header */
#globalPopup .modal-header.success {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.3), rgba(34, 197, 94, 0.3));
}

/* Error popup header */
#globalPopup .modal-header.error {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.3), rgba(220, 38, 38, 0.3));
}

/* Warning popup header */
#globalPopup .modal-header.warning {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.3), rgba(251, 191, 36, 0.3));
}

/* Info popup header */
#globalPopup .modal-header.info {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.3), rgba(139, 92, 246, 0.3));
}

/* Popup animation */
#globalPopup.fade .modal-dialog {
    transition: transform 0.3s ease-out, opacity 0.3s ease-out;
}

#globalPopup.show .modal-dialog {
    transform: scale(1) translateY(0);
}

/* Download button in popup */
#globalPopup .btn-download {
    background: linear-gradient(135deg, var(--success-color), #059669);
    border: none;
    border-radius: 12px;
    padding: 12px 24px;
    font-weight: 600;
    transition: all 0.3s ease;
    color: white;
}

#globalPopup .btn-download:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(16, 185, 129, 0.3);
    color: white;
} 

/* Progress bar styling - completely static */
.progress {
    height: 25px !important;
    border-radius: 8px;
    background-color: transparent !important;
    border: 1px solid #6c757d;
}

.progress-bar {
    height: 100%;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    line-height: 25px;
    background-color: #28a745 !important;
    /* Completely static - no transitions, animations, or effects */
    transition: none !important;
    animation: none !important;
    transform: none !important;
}

/* Remove all Bootstrap animations */
.progress-bar-striped {
    background-image: none !important;
}

.progress-bar-animated {
    animation: none !important;
}

/* Status text styling */
#progressStatus {
    margin-top: 10px;
    font-size: 14px;
}

#progressStatus small {
    color: #6c757d;
    font-weight: 500;
}

/* Download link area styling */
#downloadLinkArea {
    margin-top: 20px;
    padding: 15px;
    background-color: transparent !important;
    border: 1px solid #6c757d;
    border-radius: 8px;
}

#downloadLinkArea .btn {
    margin-top: 10px;
} 