/* PDF Splitter Tool Styles */
.tool-container {
    max-width: 900px;
    margin: 100px auto 0;
    padding: var(--space-xl);
}

.tool-header {
    text-align: center;
    margin-bottom: var(--space-2xl);
}

.tool-title {
    font-size: var(--text-3xl);
    font-weight: 700;
    margin-bottom: var(--space-md);
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.tool-description {
    font-size: var(--text-lg);
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: var(--space-md);
}

.performance-badge {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: white;
    padding: var(--space-sm) var(--space-md);
    border-radius: var(--radius-md);
    font-size: var(--text-sm);
    font-weight: 600;
    display: inline-block;
}

/* Upload Section */
.upload-section {
    background: var(--bg-primary);
    border: 2px dashed var(--border-medium);
    border-radius: var(--radius-xl);
    padding: var(--space-2xl);
    margin-bottom: var(--space-xl);
    transition: all 0.3s ease;
}

.upload-section.drag-over {
    border-color: var(--accent-primary);
    background: var(--bg-secondary);
}

.file-dropzone {
    cursor: pointer;
    margin-bottom: var(--space-xl);
}

.dropzone-content {
    pointer-events: none;
}

.dropzone-icon {
    font-size: 3rem;
    margin-bottom: var(--space-md);
}

.file-dropzone h3 {
    font-size: var(--text-xl);
    margin-bottom: var(--space-sm);
    color: var(--text-primary);
}

.file-dropzone p {
    color: var(--text-secondary);
    font-size: var(--text-sm);
}

/* Selected File */
.selected-file {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-md);
    background: var(--bg-secondary);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-lg);
}

.file-preview {
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

.file-icon {
    font-size: var(--text-2xl);
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-primary);
    border-radius: var(--radius-sm);
}

.file-details {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
}

.file-details strong {
    color: var(--text-primary);
    font-size: var(--text-base);
}

.file-details span {
    color: var(--text-secondary);
    font-size: var(--text-sm);
}

/* Split Options */
.split-options {
    border-top: 1px solid var(--border-light);
    padding-top: var(--space-xl);
}

.split-options h4 {
    margin-bottom: var(--space-lg);
    color: var(--text-primary);
}

/* Split Methods */
.split-methods {
    margin-bottom: var(--space-xl);
}

.method-tabs {
    display: flex;
    gap: var(--space-sm);
    margin-bottom: var(--space-lg);
    border-bottom: 1px solid var(--border-light);
    padding-bottom: var(--space-sm);
}

.method-tab {
    background: none;
    border: none;
    padding: var(--space-md) var(--space-lg);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
    color: var(--text-secondary);
    border-bottom: 2px solid transparent;
}

.method-tab:hover {
    color: var(--accent-primary);
    background: var(--bg-secondary);
}

.method-tab.active {
    color: var(--accent-primary);
    border-bottom-color: var(--accent-primary);
    background: var(--bg-secondary);
}

.method-content {
    display: none;
}

.method-content.active {
    display: block;
}

.method-description {
    margin-bottom: var(--space-lg);
    color: var(--text-secondary);
    font-size: var(--text-sm);
}

/* Input Groups */
.input-group {
    margin-bottom: var(--space-lg);
}

.input-group label {
    display: block;
    margin-bottom: var(--space-sm);
    font-weight: 600;
    color: var(--text-primary);
}

.range-input,
.number-input {
    width: 100%;
    max-width: 300px;
    padding: var(--space-md);
    border: 1px solid var(--border-medium);
    border-radius: var(--radius-md);
    background: var(--bg-primary);
    color: var(--text-primary);
    font-size: var(--text-base);
}

.range-input:focus,
.number-input:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.input-hint {
    margin-top: var(--space-xs);
    color: var(--text-tertiary);
    font-size: var(--text-xs);
}

/* Pages Grid */
.pages-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: var(--space-sm);
    max-height: 200px;
    overflow-y: auto;
    padding: var(--space-sm);
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
}

.page-checkbox {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-xs);
    padding: var(--space-sm);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.3s ease;
    background: var(--bg-primary);
}

.page-checkbox:hover {
    border-color: var(--accent-primary);
}

.page-checkbox.selected {
    border-color: var(--accent-primary);
    background: var(--accent-primary);
    color: white;
}

.page-checkbox input {
    display: none;
}

.page-number {
    font-size: var(--text-sm);
    font-weight: 600;
}

/* Output Preview */
.output-preview {
    margin: var(--space-lg) 0;
    padding: var(--space-md);
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
}

.output-preview h5 {
    margin-bottom: var(--space-md);
    color: var(--text-primary);
}

.preview-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
    max-height: 150px;
    overflow-y: auto;
}

.preview-item {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-sm);
    background: var(--bg-primary);
    border-radius: var(--radius-sm);
    font-size: var(--text-sm);
}

.preview-icon {
    font-size: var(--text-base);
}

/* Advanced Options */
.advanced-options {
    margin: var(--space-lg) 0;
    padding: var(--space-md);
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
}

.checkbox-option {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    margin-bottom: var(--space-sm);
    cursor: pointer;
}

.checkbox-option input[type="checkbox"] {
    margin: 0;
}

.checkbox-option span {
    color: var(--text-primary);
    font-size: var(--text-sm);
}

.split-btn {
    width: 100%;
    padding: var(--space-lg);
    font-size: var(--text-lg);
}

/* Processing Section */
.processing-section,
.result-section,
.error-section {
    background: var(--bg-primary);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-xl);
    padding: var(--space-2xl);
    margin-bottom: var(--space-xl);
}

.processing-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-lg);
}

.file-info {
    text-align: right;
}

.file-info span {
    display: block;
    font-size: var(--text-sm);
}

/* Progress Bar */
.progress-container {
    margin-bottom: var(--space-xl);
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
    overflow: hidden;
    margin-bottom: var(--space-sm);
}

.progress-fill {
    height: 100%;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    border-radius: var(--radius-md);
    width: 0%;
    transition: width 0.3s ease;
}

.progress-text {
    text-align: center;
    font-size: var(--text-sm);
    color: var(--text-secondary);
    font-weight: 600;
}

/* Processing Details */
.processing-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--space-md);
    margin-bottom: var(--space-xl);
    padding: var(--space-md);
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
}

.detail-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-sm);
}

.detail-label {
    color: var(--text-secondary);
    font-size: var(--text-sm);
}

.detail-value {
    color: var(--text-primary);
    font-weight: 600;
    font-size: var(--text-sm);
}

/* Result Section */
.result-header {
    text-align: center;
    margin-bottom: var(--space-xl);
}

.result-header h3 {
    color: #10b981;
    margin-bottom: var(--space-lg);
}

.result-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-xl);
    margin-bottom: var(--space-xl);
}

.result-stat {
    text-align: center;
}

.result-stat .label {
    display: block;
    font-size: var(--text-sm);
    color: var(--text-secondary);
    margin-bottom: var(--space-xs);
}

.result-stat .value {
    display: block;
    font-size: var(--text-xl);
    font-weight: 700;
    color: var(--text-primary);
}

.result-stat .value.success {
    color: #10b981;
}

/* Output Files */
.output-files {
    margin: var(--space-xl) 0;
}

.output-files h4 {
    margin-bottom: var(--space-lg);
    color: var(--text-primary);
}

.files-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
    max-height: 200px;
    overflow-y: auto;
}

.file-output-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-md);
    background: var(--bg-secondary);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    transition: all 0.3s ease;
}

.file-output-item:hover {
    border-color: var(--accent-primary);
}

.file-output-info {
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

.file-output-icon {
    font-size: var(--text-xl);
}

.file-output-details {
    display: flex;
    flex-direction: column;
}

.file-output-name {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--space-xs);
}

.file-output-meta {
    display: flex;
    gap: var(--space-md);
    font-size: var(--text-sm);
    color: var(--text-secondary);
}

/* Buttons */
.result-actions {
    display: flex;
    gap: var(--space-md);
    justify-content: center;
    margin-bottom: var(--space-lg);
}

.btn-primary,
.btn-secondary {
    padding: var(--space-md) var(--space-xl);
    border: none;
    border-radius: var(--radius-md);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: var(--text-base);
}

.btn-primary {
    background: var(--accent-primary);
    color: white;
}

.btn-primary:hover {
    background: var(--accent-secondary);
    transform: translateY(-2px);
}

.btn-secondary {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid var(--border-medium);
}

.btn-secondary:hover {
    border-color: var(--accent-primary);
    color: var(--accent-primary);
}

/* Error Section */
.error-content {
    text-align: center;
}

.error-icon {
    font-size: 3rem;
    margin-bottom: var(--space-md);
}

.error-content h3 {
    color: #ef4444;
    margin-bottom: var(--space-md);
}

.error-content p {
    color: var(--text-secondary);
    margin-bottom: var(--space-lg);
}

/* Features Section */
.features-section {
    margin-top: var(--space-2xl);
}

.features-section h3 {
    text-align: center;
    margin-bottom: var(--space-xl);
    font-size: var(--text-2xl);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--space-xl);
}

.feature {
    text-align: center;
    padding: var(--space-xl);
    background: var(--bg-primary);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    transition: all 0.3s ease;
}

.feature:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--accent-primary);
}

.feature-icon {
    font-size: var(--text-2xl);
    margin-bottom: var(--space-md);
}

.feature h4 {
    margin-bottom: var(--space-sm);
    color: var(--text-primary);
}

.feature p {
    color: var(--text-secondary);
    font-size: var(--text-sm);
    line-height: 1.5;
}

/* Privacy Notice */
.privacy-notice {
    text-align: center;
    padding: var(--space-md);
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    font-size: var(--text-sm);
    color: var(--text-secondary);
}

/* Utility Classes */
.hidden {
    display: none !important;
}

/* Responsive Design */
@media (max-width: 768px) {
    .tool-container {
        margin-top: 80px;
        padding: var(--space-md);
    }
    
    .processing-header {
        flex-direction: column;
        gap: var(--space-md);
        text-align: center;
    }
    
    .file-info {
        text-align: center;
    }
    
    .result-actions {
        flex-direction: column;
    }
    
    .result-stats {
        grid-template-columns: 1fr;
        gap: var(--space-md);
    }
    
    .processing-details {
        grid-template-columns: 1fr;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    .method-tabs {
        flex-direction: column;
    }
    
    .selected-file {
        flex-direction: column;
        gap: var(--space-md);
        text-align: center;
    }
    
    .pages-grid {
        grid-template-columns: repeat(auto-fill, minmax(60px, 1fr));
    }
}