/* PDF Converter Styles */

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.tool-info h1 {
    margin: 0 0 0.5rem 0;
    font-size: 2.5rem;
    font-weight: 700;
}

.tool-info p {
    margin: 0;
    opacity: 0.9;
    font-size: 1.1rem;
}

.header-actions {
    display: flex;
    gap: 1rem;
    align-items: center;
    justify-content: flex-end;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--subtle-border-color);
}

.header-actions .btn {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    backdrop-filter: blur(10px);
}

.header-actions .btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

/* Upload Section */
.upload-section {
    margin-bottom: 2rem;
}

.upload-area {
    border: 3px dashed #e1e5e9;
    border-radius: 12px;
    padding: 3rem 2rem;
    text-align: center;
    background: #f8fafc;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.upload-area::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(103, 126, 234, 0.1), transparent);
    transition: left 0.5s ease;
}

.upload-area:hover {
    border-color: #667eea;
    background: #f0f4ff;
    transform: translateY(-2px);
}

.upload-area:hover::before {
    left: 100%;
}

.upload-area.dragover {
    border-color: #667eea;
    background: #e6f0ff;
    transform: scale(1.02);
}

.upload-content {
    position: relative;
    z-index: 1;
}

.upload-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    color: #667eea;
}

.upload-icon svg {
    width: 100%;
    height: 100%;
}

.upload-content h3 {
    margin: 0 0 1rem 0;
    color: #2d3748;
    font-size: 1.5rem;
    font-weight: 600;
}

.upload-content p {
    margin: 0.5rem 0;
    color: #718096;
    font-size: 1rem;
}

.file-limit {
    font-size: 0.9rem !important;
    color: #a0aec0 !important;
}

/* Options Section */
.options-section {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    border: 1px solid #e2e8f0;
}

.options-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    align-items: end;
}

.option-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.option-group label {
    font-weight: 600;
    color: #2d3748;
    font-size: 0.9rem;
}

.form-select,
.form-input {
    padding: 0.75rem 1rem;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: white;
}

.form-select:focus,
.form-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* Files Section */
.files-section {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    border: 1px solid #e2e8f0;
}

.files-list {
    display: grid;
    gap: 1rem;
}

.file-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    background: #f7fafc;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

.file-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex: 1;
}

.file-icon {
    width: 40px;
    height: 40px;
    color: #667eea;
}

.file-details h4 {
    margin: 0 0 0.25rem 0;
    color: #2d3748;
    font-size: 1rem;
    font-weight: 600;
}

.file-details p {
    margin: 0;
    color: #718096;
    font-size: 0.9rem;
}

.file-actions {
    display: flex;
    gap: 0.5rem;
}

.btn-icon {
    padding: 0.5rem;
    border: none;
    background: none;
    color: #718096;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.btn-icon:hover {
    background: #e2e8f0;
    color: #2d3748;
}

.btn-icon svg {
    width: 20px;
    height: 20px;
}

/* Preview Section */
.preview-section {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    border: 1px solid #e2e8f0;
}

.preview-container {
    max-height: 600px;
    overflow-y: auto;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #f7fafc;
}

.preview-content {
    padding: 1rem;
    text-align: center;
}

.preview-page {
    margin-bottom: 1rem;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.preview-page img {
    max-width: 100%;
    height: auto;
    display: block;
}

.preview-page canvas {
    max-width: 100%;
    height: auto;
    border: 1px solid #e2e8f0;
}

/* Progress Section */
.progress-section {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    border: 1px solid #e2e8f0;
    text-align: center;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: #e2e8f0;
    border-radius: 4px;
    overflow: hidden;
    margin: 1rem 0;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea, #764ba2);
    border-radius: 4px;
    transition: width 0.3s ease;
    width: 0%;
}

.progress-text {
    color: #718096;
    font-size: 0.9rem;
    margin: 0;
}

/* Results Section */
.results-section {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    border: 1px solid #e2e8f0;
}

.results-container {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.results-list {
    display: grid;
    gap: 1rem;
}

.result-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    background: #f7fafc;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

.result-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex: 1;
}

.result-preview {
    width: 60px;
    height: 60px;
    border-radius: 6px;
    overflow: hidden;
    background: #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.result-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.result-preview svg {
    width: 30px;
    height: 30px;
    color: #718096;
}

.result-details h4 {
    margin: 0 0 0.25rem 0;
    color: #2d3748;
    font-size: 1rem;
    font-weight: 600;
}

.result-details p {
    margin: 0;
    color: #718096;
    font-size: 0.9rem;
}

.results-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.btn svg {
    width: 20px;
    height: 20px;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
}

.btn-secondary {
    background: #f7fafc;
    color: #2d3748;
    border: 2px solid #e2e8f0;
}

.btn-secondary:hover {
    background: #edf2f7;
    border-color: #cbd5e0;
    transform: translateY(-2px);
}

.btn-success {
    background: linear-gradient(135deg, #48bb78 0%, #38a169 100%);
    color: white;
}

.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(72, 187, 120, 0.3);
}

/* Responsive Design */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        text-align: center;
    }
    
    .tool-info h1 {
        font-size: 2rem;
    }
    
    .upload-area {
        padding: 2rem 1rem;
    }
    
    .options-container {
        grid-template-columns: 1fr;
    }
    
    .file-item,
    .result-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .file-actions,
    .result-actions {
        width: 100%;
        justify-content: flex-end;
    }
    
    .results-actions {
        flex-direction: column;
    }
}

/* Loading Animation */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading {
    animation: spin 1s linear infinite;
}

/* Success Animation */
@keyframes checkmark {
    0% {
        transform: scale(0);
        opacity: 0;
    }
    50% {
        transform: scale(1.2);
        opacity: 1;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.success-icon {
    animation: checkmark 0.5s ease-in-out;
}

/* Error States */
.error {
    color: #e53e3e;
    background: #fed7d7;
    border-color: #feb2b2;
}

.error-message {
    background: #fed7d7;
    color: #c53030;
    padding: 1rem;
    border-radius: 8px;
    border: 1px solid #feb2b2;
    margin: 1rem 0;
}

/* Hidden Elements */
.hidden {
    display: none !important;
}

/* Utility Classes */
.text-center {
    text-align: center;
}

.mb-0 {
    margin-bottom: 0;
}

.mt-2 {
    margin-top: 1rem;
}

.opacity-50 {
    opacity: 0.5;
}

.pointer-events-none {
    pointer-events: none;
}