/* PDF Merger Tool Styles */

:root {
    --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);
}

body {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%) !important;
}

.main-content {
    margin-left: 280px;
    padding: 2rem;
    min-height: 100vh;
    transition: all 0.3s ease;

    color: #f8fafc;
}

body.sidebar-collapsed .main-content {
    margin-left: 80px;
}

/* Tool Header */
.tool-header {
    margin-bottom: 2rem;
    text-align: center;
}

.tool-header h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, #6366f1 0%, #a855f7 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.tool-header p {
    color: #94a3b8;
    font-size: 1.1rem;
}

/* Upload Section */
.upload-section {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border: 2px dashed var(--glass-border);
    border-radius: 20px;
    padding: 3rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    max-width: 800px;
    margin: 0 auto;
}

.upload-section:hover,
.upload-section.drag-over {
    background: rgba(255, 255, 255, 0.08);
    border-color: #6366f1;
    transform: translateY(-5px);
}

.upload-icon {
    font-size: 4rem;
    color: #6366f1;
    margin-bottom: 1rem;
}

.upload-card h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.upload-card p span {
    color: #6366f1;
    font-weight: 600;
    text-decoration: underline;
}

.features-grid {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-top: 2rem;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    color: #94a3b8;
}

.feature-item i {
    color: #6366f1;
}

/* Tool Container */
.tool-container {
    max-width: 900px;
    margin: 2rem auto;
}

.file-manager-layout {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 2rem;
    box-shadow: var(--card-shadow);
}

.file-list-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--glass-border);
}

.count-badge {
    background: #6366f1;
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.8rem;
    margin-left: 8px;
}

.header-actions {
    display: flex;
    gap: 10px;
}

/* File List Item Styles */
.file-list {
    list-style: none;
    padding: 0;
    margin: 0 0 2rem 0;
}

.file-item {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 1rem;
    margin-bottom: 0.8rem;
    display: flex;
    align-items: center;
    gap: 15px;
    cursor: grab;
    transition: all 0.2s ease;
}

.file-item:active {
    cursor: grabbing;
}

.file-item.sortable-ghost {
    opacity: 0.4;
    background: #6366f1;
}

.drag-handle {
    color: #475569;
    cursor: grab;
}

.file-icon {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.file-icon.pdf {
    color: #ef4444;
}

.file-icon.image {
    color: #10b981;
}

.file-info {
    flex: 1;
}

.file-name {
    font-weight: 500;
    font-size: 0.95rem;
    display: block;
    max-width: 400px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.file-size {
    font-size: 0.8rem;
    color: #64748b;
}

.remove-file {
    color: #94a3b8;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.1rem;
    padding: 5px;
    border-radius: 50%;
    transition: all 0.2s;
}

.remove-file:hover {
    color: #ef4444;
    background: rgba(239, 68, 68, 0.1);
}

/* Interaction Panel */
.status-card {
    text-align: center;
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 12px;
}

.progress-container {
    margin-top: 1rem;
}

.progress-bar-wrapper {
    height: 8px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 5px;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #6366f1 0%, #a855f7 100%);
    width: 0%;
    transition: width 0.3s ease;
}

#progress-percent {
    font-size: 0.85rem;
    color: #94a3b8;
}

/* Buttons */
.action-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.primary-btn,
.secondary-btn,
.danger-btn,
.success-btn {
    padding: 0.8rem 1.5rem;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.2s;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
}

.primary-btn {
    background: #6366f1;
    color: white;
}

.primary-btn:hover:not(:disabled) {
    background: #4f46e5;
    transform: translateY(-2px);
}

.primary-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.secondary-btn {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.secondary-btn:hover {
    background: rgba(255, 255, 255, 0.15);
}

.danger-btn {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

.danger-btn:hover {
    background: rgba(239, 68, 68, 0.2);
}

.success-btn {
    background: #10b981;
    color: white;
}

.success-btn:hover {
    background: #059669;
    transform: translateY(-2px);
}

/* Utilities */
.hidden {
    display: none !important;
}

/* Responsive */
@media (max-width: 1024px) {
    .main-content {
        margin-left: 0;
        padding: 1rem;
    }

    .features-grid {
        flex-direction: column;
        align-items: center;
        gap: 1rem;
    }
}

@media (max-width: 640px) {
    .file-manager-layout {
        padding: 1rem;
    }

    .file-name {
        max-width: 200px;
    }

    .action-buttons {
        flex-direction: column;
    }

    .primary-btn,
    .secondary-btn {
        width: 100%;
        justify-content: center;
    }
}