/* ====================== COMMON STYLES FOR PDF TOOLS (Compressor, Merger, Splitter) ====================== */

/* Import fonts */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;600;700;800&display=swap');

.pdfmerger-container,
.pdfsplitter-container,
.pdfcomp-container {
    max-width: 1200px;
    margin: 2.5rem auto;
    padding: 0 1.5rem;
    font-family: 'Poppins', sans-serif;
}

.pdfmerger-wrapper,
.pdfsplitter-wrapper,
.pdfcomp-wrapper {
    max-width: 900px;
    margin: 0 auto;
}

/* Title Styles */
.pdfmerger-title,
.pdfsplitter-title,
.pdfcomp-title {
    font-size: 3rem;
    font-weight: 800;
    font-family: 'Poppins', sans-serif;
    text-align: center;
    margin-bottom: 0.5rem;
    color: var(--text);
    letter-spacing: -0.02em;
}

.pdfmerger-heart,
.pdfsplitter-heart,
.pdfcomp-heart {
    font-size: 2.8rem;
    display: inline-block;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.pdfmerger-subtitle,
.pdfsplitter-subtitle,
.pdfcomp-subtitle {
    text-align: center;
    color: var(--text-light);
    font-size: 1.1rem;
    margin-bottom: 2.5rem;
    font-family: 'Poppins', sans-serif;
}

/* Card Styles */
.pdfmerger-card,
.pdfsplitter-card,
.pdfcomp-card {
    background: var(--surface);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    padding: 2rem;
    box-shadow: var(--shadow);
}

/* ====================== UPLOAD AREA ====================== */
.upload-area {
    border: 3px dashed var(--border);
    border-radius: 16px;
    padding: 4rem 2rem;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
    background: var(--bg);
}

.upload-area:hover {
    border-color: var(--primary);
    background: rgba(99, 102, 241, 0.05);
}

.upload-icon { 
    font-size: 4.5rem; 
    margin-bottom: 1rem; 
}

.upload-content h3 { 
    margin: 0.5rem 0; 
    color: var(--text); 
}

.upload-content p { 
    color: var(--text-light); 
    margin-bottom: 1.5rem; 
}

.upload-button {
    background: var(--primary);
    color: white;
    border: none;
    padding: 0.9rem 2rem;
    border-radius: 12px;
    font-size: 1.05rem;
    font-weight: 600;
    cursor: pointer;
}

/* ====================== FILE LIST ====================== */
.file-list {
    max-height: 380px;
    overflow-y: auto;
    margin-bottom: 1.5rem;
    padding-right: 10px;
}

.file-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1rem 1.2rem;
    margin-bottom: 0.8rem;
    cursor: grab;
    user-select: none;
}

.file-item:active {
    cursor: grabbing;
}

.file-name { 
    font-weight: 500; 
    color: var(--text); 
    flex: 1; 
}

.file-size { 
    color: var(--text-light); 
    font-size: 0.95rem; 
}

/* File Actions (Remove Button) */
.file-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.remove-btn {
    background: #ef4444;
    color: white;
    border: none;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.remove-btn:hover {
    background: #dc2626;
}

/* ====================== ADD MORE BUTTON ====================== */
.add-more-container {
    text-align: center;
    margin: 1.2rem 0 1.8rem 0;
}

.add-more-btn {
    background: transparent;
    border: 2px dashed var(--border);
    color: var(--text-light);
    padding: 0.75rem 1.8rem;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.add-more-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: rgba(99, 102, 241, 0.05);
}

/* ====================== ACTIONS & PROGRESS ====================== */
.pdfmerger-actions,
.pdfsplitter-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-top: 1.5rem;
}

.pdfcomp-action-btn {
    flex: 1;
    padding: 1.1rem;
    border-radius: 14px;
    font-weight: 600;
    font-size: 1.05rem;
    cursor: pointer;
    transition: all 0.3s;
}

.merge-btn {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: white;
    border: none;
}

.split-btn {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: white;
    border: none;
}

.pdfcomp-action-btn:not(.merge-btn):not(.split-btn) {
    background: transparent;
    border: 2px solid var(--border);
    color: var(--text);
}

/* Progress Bar */
.progress-bar-container {
    margin: 2rem 0;
}

.progress-bar {
    height: 10px;
    background: var(--bg);
    border-radius: 9999px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #6366f1, #8b5cf6);
    width: 0%;
    transition: width 0.4s ease;
}

.progress-text {
    display: block;
    text-align: center;
    margin-top: 0.6rem;
    font-size: 0.95rem;
    color: var(--text-light);
}

/* ====================== RESULTS SECTION ====================== */
.results-area {
    margin-top: 2.5rem;
    padding: 2rem;
    background: var(--surface);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
}

.results-list {
    max-height: 480px;
    overflow-y: auto;
}

.result-item {
    display: flex;
    flex-direction: column;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.2rem;
    margin-bottom: 1rem;
}

.result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.8rem;
}

.result-name {
    font-weight: 600;
    color: var(--text);
    flex: 1;
}

.size-comparison {
    text-align: right;
    font-size: 0.95rem;
}

.compressed-size {
    color: #10b981;
    font-weight: 700;
}

.download-btn {
    margin-top: 12px;
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    border: none;
    padding: 0.9rem 1.5rem;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    width: 100%;
    transition: all 0.3s;
}

.download-btn:hover {
    background: linear-gradient(135deg, #059669, #047857);
    transform: translateY(-2px);
}

/* ====================== SEO BENEFITS SECTION ====================== */
.pdfcomp-benefits {
    margin: 3.5rem 0;
    padding: 2.5rem;
    background: var(--surface);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
}

.pdfcomp-benefits h3 {
    text-align: center;
    font-size: 1.75rem;
    margin-bottom: 2rem;
    color: var(--text);
    font-weight: 700;
}

.benefits-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.8rem;
    margin-bottom: 2.5rem;
}

.benefit-item {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 1.6rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.benefit-item:hover {
    transform: translateY(-6px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.08);
}

.benefit-icon {
    font-size: 2.4rem;
    margin-bottom: 1rem;
    display: block;
}

.benefit-item h4 {
    font-size: 1.25rem;
    margin: 0 0 0.8rem 0;
    color: var(--text);
    font-weight: 600;
}

.benefit-item p {
    color: var(--text-light);
    line-height: 1.5;
    margin: 0;
}

/* Tool Performance */
.tool-performance {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 1.8rem;
}

.tool-performance h4 {
    text-align: center;
    margin-bottom: 1.2rem;
    color: var(--text);
    font-size: 1.35rem;
}

.tool-performance ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.tool-performance li {
    padding: 0.65rem 0;
    color: var(--text-light);
    position: relative;
    padding-left: 1.8rem;
    line-height: 1.45;
}

.tool-performance li:before {
    content: "✓";
    position: absolute;
    left: 0;
    color: #10b981;
    font-weight: bold;
}

.tool-performance strong {
    color: var(--text);
}

/* ====================== DRAG & DROP VISUAL FEEDBACK ====================== */
.file-item.dragging {
    opacity: 0.5;
    transform: scale(0.98);
}

.file-item.drag-over {
    border-color: var(--primary);
    background: rgba(99, 102, 241, 0.08);
}

/* ====================== MOBILE OPTIMIZATIONS ====================== */
@media (max-width: 767px) {
    .pdfmerger-title,
    .pdfsplitter-title,
    .pdfcomp-title { 
        font-size: 2.4rem; 
    }
    
    .pdfmerger-card,
    .pdfsplitter-card,
    .pdfcomp-card { 
        padding: 1.5rem; 
    }
    
    .pdfcomp-benefits {
        padding: 2rem 1.5rem;
        margin: 2.5rem 0;
    }
    
    .benefits-grid {
        grid-template-columns: 1fr;
        gap: 1.4rem;
    }
    
    .pdfcomp-benefits h3 {
        font-size: 1.55rem;
    }
}