/* PDF Compressor - Single Responsive Styles */
.pdfcomp-container {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 1.5rem;
}
.pdfcomp-wrapper {
    max-width: 950px;
    margin: 0 auto;
}
.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;
}
.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); }
}
.pdfcomp-subtitle {
    text-align: center;
    color: var(--text-light);
    font-size: 1.1rem;
    margin-bottom: 2.5rem;
    font-family: 'Poppins', sans-serif;
}
.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;
    transition: opacity 0.2s;
}
.upload-button:hover {
    opacity: 0.9;
}

/* Compression Panel */
.compress-panel .file-list {
    max-height: 320px;
    overflow-y: auto;
    margin-bottom: 2rem;
    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;
    margin-bottom: 0.8rem;
}
.file-name { font-weight: 500; color: var(--text); flex: 1; }
.file-size { color: var(--text-light); font-size: 0.95rem; }

/* Quality Buttons */
.compression-options label {
    display: block;
    margin-bottom: 0.8rem;
    font-weight: 600;
    color: var(--text);
}
.quality-buttons {
    display: flex;
    gap: 0.8rem;
    flex-wrap: wrap;
    padding:1.4rem 0;
}
.quality-btn {
    flex: 1;
    min-width: 110px;
    padding: 0.9rem 1.2rem;
    border: 2px solid var(--border);
    background: var(--surface);
    border-radius: 12px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: 500;
    color: var(--text);
}
.quality-btn:hover {
    border-color: var(--primary);
}
.quality-btn.active {
    border-color: var(--primary);
    background: var(--primary);
    color: white;
}

/* Progress */
.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);
}

/* Actions */
.pdfcomp-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}
.pdfcomp-action-btn {
    flex: 1;
    padding: 1rem 1.5rem;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}
.compress-btn {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    border: none;
}
.compress-btn:hover:not(:disabled) {
    opacity: 0.9;
    transform: translateY(-1px);
}
.compress-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}
.pdfcomp-action-btn:not(.compress-btn) {
    background: var(--bg);
    color: var(--text);
    border: 1px solid var(--border);
}
.pdfcomp-action-btn:not(.compress-btn):hover {
    background: var(--border);
}

/* ===== DOWNLOAD RESULTS CARD ===== */
.download-card-container {
    margin-top: 2rem;
}
.download-card {
    background: var(--surface);
    border: 2px solid #10b981;
    border-radius: 16px;
    padding: 1.5rem 1.8rem;
    box-shadow: 0 4px 20px rgba(16, 185, 129, 0.15);
    animation: slideUp 0.5s ease;
}
@keyframes slideUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

.download-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.2rem;
}
.download-icon { font-size: 2rem; }
.download-header h3 {
    font-size: 1.3rem;
    font-weight: 700;
    color: #10b981;
    margin: 0;
}

.download-stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.8rem;
    margin-bottom: 1.2rem;
}
.stat-item {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 0.8rem 1rem;
    text-align: center;
}
.stat-label {
    display: block;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-light);
    font-weight: 600;
}
.stat-value {
    display: block;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text);
    margin-top: 2px;
}

/* File Results - Shows Size Comparison */
.file-results-container {
    max-height: 320px;
    overflow-y: auto;
    margin: 1rem 0 1.2rem;
}
.file-result-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.8rem;
    padding: 0.8rem 1rem;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 10px;
    margin-bottom: 0.5rem;
    flex-wrap: wrap;
}
.file-result-name {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex: 1;
    min-width: 140px;
}
.file-result-name .file-icon { font-size: 1.1rem; }
.file-result-name span:last-child {
    font-weight: 500;
    color: var(--text);
    font-size: 0.9rem;
    word-break: break-word;
}

.file-result-stats {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}
.file-size-before {
    color: var(--text-light);
    font-size: 0.8rem;
    text-decoration: line-through;
}
.file-size-arrow {
    color: var(--text-light);
    font-size: 0.75rem;
}
.file-size-after {
    font-weight: 600;
    color: #10b981;
    font-size: 0.85rem;
}
.file-percent-reduction {
    font-weight: 700;
    font-size: 0.8rem;
    padding: 0.15rem 0.7rem;
    border-radius: 9999px;
}
.file-percent-reduction.high {
    background: rgba(16, 185, 129, 0.15);
    color: #10b981;
}
.file-percent-reduction.medium {
    background: rgba(251, 191, 36, 0.15);
    color: #d97706;
}
.file-percent-reduction.low {
    background: rgba(239, 68, 68, 0.10);
    color: #ef4444;
}

.file-download-single {
    background: var(--primary);
    color: white;
    border: none;
    padding: 0.3rem 0.8rem;
    border-radius: 6px;
    font-size: 1.1rem;
    cursor: pointer;
    transition: background 0.2s;
    flex-shrink: 0;
}
.file-download-single:hover {
    background: var(--primary-dark);
}

/* Download Footer */
.download-footer {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
}
.download-meta {
    font-size: 0.8rem;
    color: var(--text-light);
    display: flex;
    gap: 0.5rem;
    align-items: center;
}
.download-all-btn {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    border: none;
    padding: 0.7rem 2rem;
    border-radius: 10px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s;
}
.download-all-btn:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

/* Tips */
.pdfcomp-tips {
    margin: 3rem 0;
    padding: 2rem;
    background: var(--surface);
    border-radius: var(--radius);
    border: 1px solid var(--border);
}

/* Mobile Optimizations */
@media (max-width: 767px) {
    .pdfcomp-title { font-size: 2.4rem; }
    .pdfcomp-heart { font-size: 2.2rem; }
    .pdfcomp-card { padding: 1.2rem; }
    .upload-area { padding: 2.5rem 1.2rem; }
    
    .quality-buttons { flex-direction: column; }
    .quality-btn { min-width: unset; }
    
    .pdfcomp-actions { flex-direction: column; }
    .pdfcomp-action-btn { flex: unset; }
    
    .download-stats-grid { grid-template-columns: 1fr 1fr; }
    
    .file-result-item {
        flex-direction: column;
        align-items: stretch;
        gap: 0.4rem;
        padding: 0.7rem;
    }
    .file-result-stats {
        justify-content: flex-start;
    }
    .file-download-single {
        align-self: flex-end;
    }
    
    .download-footer {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
    }
    .download-meta {
        justify-content: center;
    }
    .download-all-btn {
        width: 100%;
        text-align: center;
    }

}

@media (max-width: 480px) {
    .pdfcomp-title { font-size: 1.8rem; }
    .pdfcomp-card { padding: 1rem; }
    .upload-area { padding: 1.8rem 0.8rem; }
    .upload-icon { font-size: 3rem; }
    .upload-content h3 { font-size: 1rem; }
    .file-result-stats { font-size: 0.8rem; }
}