/* PDF Splitter - Premium Styles */

:root {
    --primary-gradient: linear-gradient(135deg, #6366f1 0%, #a855f7 100%);
    --secondary-gradient: linear-gradient(135deg, #3b82f6 0%, #2dd4bf 100%);
    --success-gradient: linear-gradient(135deg, #10b981 0%, #3b82f6 100%);
    --danger-gradient: linear-gradient(135deg, #f43f5e 0%, #fb923c 100%);
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --card-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
}

body {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%) !important;
    margin: 0;
    font-family: 'Outfit', sans-serif;
    color: var(--text-primary);
    overflow-x: hidden;
}

/* Layout Fixing */
.main-content {
    margin-left: 280px;
    padding: 3rem 2rem;
    min-height: 100vh;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

body.sidebar-collapsed .main-content {
    margin-left: 80px;
}

/* Header */
.tool-header {
    text-align: center;
    margin-bottom: 4rem;
    animation: fadeInDown 0.8s ease-out;
}

.tool-header h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

.tool-header p {
    color: var(--text-secondary);
    font-size: 1.2rem;
    max-width: 600px;
    margin: 0 auto;
}

/* Premium Cards */
.upload-section {
    max-width: 800px;
    margin: 0 auto;
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 2px dashed var(--glass-border);
    border-radius: 32px;
    padding: 5rem 3rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    animation: zoomIn 0.6s ease-out;
}

.upload-section:hover,
.upload-section.drag-over {
    background: rgba(255, 255, 255, 0.08);
    border-color: #6366f1;
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.upload-icon {
    font-size: 5rem;
    color: #6366f1;
    margin-bottom: 1.5rem;
    filter: drop-shadow(0 0 15px rgba(99, 102, 241, 0.3));
}

.upload-card h3 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
}

.upload-card p span {
    color: #6366f1;
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 4px;
}

/* Features Highlight */
.features-grid {
    display: flex;
    justify-content: center;
    gap: 3rem;
    margin-top: 3rem;
    animation: fadeInUp 1s ease-out;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1rem;
    color: var(--text-secondary);
}

.feature-item i {
    color: #6366f1;
    font-size: 1.2rem;
}

/* Tool Container */
.tool-container {
    max-width: 1000px;
    margin: 2rem auto;
    animation: fadeIn 0.5s ease-out;
}

.split-layout {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: 28px;
    padding: 2.5rem;
    box-shadow: var(--card-shadow);
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
}

/* File Info Bar */
.file-info-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.2rem 2rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 20px;
    border: 1px solid var(--glass-border);
}

.file-details {
    display: flex;
    align-items: center;
    gap: 1.2rem;
}

.file-details i {
    font-size: 2rem;
    color: #ef4444;
}

.file-details span {
    display: block;
    font-weight: 600;
    font-size: 1.2rem;
}

.file-details small {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Tabs */
.tabs {
    display: flex;
    gap: 0.5rem;
    background: rgba(0, 0, 0, 0.2);
    padding: 0.5rem;
    border-radius: 16px;
    margin-bottom: 2rem;
    width: fit-content;
}

.tab-btn {
    padding: 0.8rem 1.8rem;
    background: none;
    border: none;
    color: var(--text-secondary);
    font-family: inherit;
    font-weight: 600;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.tab-btn.active {
    background: var(--primary-gradient);
    color: white;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.tab-btn:hover:not(.active) {
    color: white;
    background: rgba(255, 255, 255, 0.05);
}

/* Input Styles */
.dynamic-inputs {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
    margin: 1.5rem 0;
}

.input-row {
    display: flex;
    gap: 1rem;
}

.input-row input {
    flex: 1;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--glass-border);
    border-radius: 14px;
    padding: 1rem 1.5rem;
    color: white;
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.3s;
}

.input-row input:focus {
    outline: none;
    border-color: #6366f1;
    background: rgba(0, 0, 0, 0.3);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.15);
}

.remove-row-btn {
    width: 54px;
    height: 54px;
    background: rgba(244, 63, 94, 0.1);
    color: #f43f5e;
    border: 1px solid rgba(244, 63, 94, 0.2);
    border-radius: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    transition: all 0.3s;
}

.remove-row-btn:hover:not(:disabled) {
    background: #f43f5e;
    color: white;
}

/* Results section */
.results-grid {
    border-top: 1px solid var(--glass-border);
    padding-top: 3rem;
}

.file-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.result-item {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 1.2rem;
    display: flex;
    align-items: center;
    gap: 1.2rem;
    transition: all 0.3s;
}

.result-item:hover {
    background: rgba(255, 255, 255, 0.07);
    transform: scale(1.02);
}

/* Progress area */
.status-card {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 24px;
    padding: 3rem;
    text-align: center;
}

.progress-bar-wrapper {
    height: 10px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    overflow: hidden;
    margin: 1.5rem 0;
}

.progress-bar {
    height: 100%;
    background: var(--primary-gradient);
    border-radius: 20px;
    transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Buttons */
.primary-btn,
.secondary-btn,
.success-btn,
.danger-btn {
    padding: 1rem 2rem;
    border-radius: 16px;
    font-weight: 600;
    font-size: 1.05rem;
    font-family: inherit;
    cursor: pointer;
    border: none;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.primary-btn {
    background: var(--primary-gradient);
    color: white;
    box-shadow: 0 8px 20px rgba(99, 102, 241, 0.3);
}

.primary-btn:hover:not(:disabled) {
    transform: translateY(-3px);
    box-shadow: 0 12px 25px rgba(99, 102, 241, 0.4);
}

.success-btn {
    background: var(--success-gradient);
    color: white;
}

.success-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(16, 185, 129, 0.3);
}

/* Animations */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes zoomIn {
    from {
        opacity: 0;
        scale: 0.95;
    }

    to {
        opacity: 1;
        scale: 1;
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* Mobile Responsive */
@media (max-width: 1024px) {
    .main-content {
        margin-left: 0 !important;
        padding: 2rem 1rem;
    }

    .tool-header h1 {
        font-size: 2.2rem;
    }

    .features-grid {
        flex-direction: column;
        gap: 1.5rem;
        align-items: flex-start;
        padding-left: 1rem;
    }
}

@media (max-width: 640px) {
    .split-layout {
        padding: 1.5rem;
    }

    .file-info-bar {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }

    .file-details i {
        font-size: 1.5rem;
    }

    .tabs {
        width: 100%;
    }

    .tab-btn {
        flex: 1;
        padding: 0.8rem 0.5rem;
        font-size: 0.9rem;
    }

    .action-footer {
        width: 100%;
    }

    .primary-btn {
        width: 100%;
        justify-content: center;
    }
}

.loader-circle {
    width: 60px;
    height: 60px;
    border: 4px solid rgba(255, 255, 255, 0.1);
    border-top: 4px solid #6366f1;
    border-radius: 50%;
    margin: 0 auto 2rem;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.hidden {
    display: none !important;
}

/* Overlays & Error States */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.error-card {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    border: 1px solid rgba(244, 63, 94, 0.2);
    border-radius: 24px;
    padding: 3rem;
    max-width: 500px;
    width: 90%;
    text-align: center;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    animation: zoomIn 0.3s ease-out;
}

.error-card i {
    font-size: 4rem;
    color: #f43f5e;
    margin-bottom: 1.5rem;
}

.error-card h3 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
    color: #fff;
}

.error-card p {
    color: var(--text-secondary);
    margin-bottom: 2rem;
    line-height: 1.6;
}