/* Base Styles */
:root {
    --primary-color: #4361ee;
    --primary-dark: #3a56d4;
    --secondary-color: #3f37c9;
    --text-color: #333333;
    --text-light: #666666;
    --bg-color: #f8f9fa;
    --card-bg: #ffffff;
    --border-color: #e0e0e0;
    --shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    --shadow-hover: 0 8px 30px rgba(0, 0, 0, 0.12);
    --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    --error-color: #e63946;
    --success-color: #4cc9f0;
    --border-radius: 12px;
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
}

/* Layout */
.pdf-converter-container {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 1.5rem;
}

.converter-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.converter-header h1 {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
}

.converter-header .subtitle {
    font-size: 1.1rem;
    color: var(--text-light);
    font-weight: 400;
}

/* Cards */
.converter-card {
    background-color: var(--card-bg);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    padding: 2rem;
    margin-bottom: 2rem;
    transition: var(--transition);
}

.converter-card:hover {
    box-shadow: var(--shadow-hover);
}

/* Upload Area */
.upload-area {
    border: 2px dashed var(--border-color);
    border-radius: var(--border-radius);
    padding: 3rem 2rem;
    text-align: center;
    margin-bottom: 1.5rem;
    transition: var(--transition);
}

.upload-area.highlight {
    border-color: var(--primary-color);
    background-color: rgba(67, 97, 238, 0.03);
}

.upload-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.upload-icon {
    font-size: 3.5rem;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.upload-area h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-color);
}

.upload-area p {
    color: var(--text-light);
    margin: 0.5rem 0;
}

/* Buttons */
.btn {
    padding: 0.75rem 1.75rem;
    border: none;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.95rem;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
}

.btn-convert {
    background-color: var(--primary-color);
    color: white;
}

.btn-convert:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
}

.btn-clear {
    background-color: transparent;
    color: var(--error-color);
    border: 1px solid var(--error-color);
}

.btn-clear:hover {
    background-color: rgba(230, 57, 70, 0.1);
}

.btn-download-all {
    background-color: var(--secondary-color);
    color: white;
}

.btn-download-all:hover {
    background-color: #3830a8;
    transform: translateY(-2px);
}

/* File Info Card */
.file-info-card {
    background-color: var(--card-bg);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow);
    display: none;
}

.file-details {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    margin-bottom: 1.5rem;
}

.file-icon {
    font-size: 2.5rem;
    color: var(--primary-color);
}

.file-meta h4 {
    font-size: 1.1rem;
    margin-bottom: 0.25rem;
    color: var(--text-color);
}

.file-stats {
    display: flex;
    gap: 1rem;
    color: var(--text-light);
    font-size: 0.9rem;
}

.action-buttons {
    display: flex;
    gap: 1rem;
}

/* Options Card */
.options-card {
    background-color: var(--card-bg);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow);
    display: none;
    flex-wrap: wrap;
    gap: 2rem;
}

.option-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    flex: 1;
    min-width: 200px;
}

.option-group label {
    font-weight: 500;
    color: var(--text-color);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.form-select, .form-input {
    padding: 0.75rem 1rem;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: inherit;
    font-size: 0.95rem;
    transition: var(--transition);
}

.form-select:focus, .form-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.2);
}

/* Progress Bar */
.progress-container {
    background-color: var(--card-bg);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow);
    display: none;
    flex-direction: column;
    gap: 1rem;
}

.progress-info {
    display: flex;
    justify-content: space-between;
    font-size: 0.95rem;
}

.progress-bar {
    width: 100%;
    height: 10px;
    background-color: var(--border-color);
    border-radius: 5px;
    overflow: hidden;
}

.progress {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    width: 0%;
    transition: width 0.3s ease;
}

/* Gallery */
.results-container {
    background-color: var(--card-bg);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    padding: 2rem;
    margin-bottom: 2rem;
}

.gallery-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.gallery-header h2 {
    font-size: 1.5rem;
    color: var(--text-color);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

.gallery-item {
    background-color: var(--card-bg);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}

.gallery-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.gallery-img {
    width: 100%;
    height: 200px;
    object-fit: contain;
    background-color: #f5f5f5;
    border-bottom: 1px solid var(--border-color);
}

.gallery-info {
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.gallery-info h3 {
    font-size: 1rem;
    font-weight: 500;
}

.gallery-actions {
    display: flex;
    gap: 0.75rem;
}

.gallery-actions .btn {
    flex: 1;
    padding: 0.5rem;
    font-size: 0.9rem;
    justify-content: center;
}

/* Responsive Design */
@media (max-width: 768px) {
    .pdf-converter-container {
        padding: 0 1rem;
    }
    
    .converter-header h1 {
        font-size: 2rem;
    }
    
    .converter-card {
        padding: 1.5rem;
    }
    
    .action-buttons {
        flex-direction: column;
    }
    
    .gallery {
        grid-template-columns: 1fr;
    }
    
    .gallery-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
}

@media (max-width: 480px) {
    .upload-area {
        padding: 2rem 1rem;
    }
    
    .file-details {
        flex-direction: column;
        text-align: center;
    }
    
    .file-icon {
        margin-bottom: 0.5rem;
    }
    
    .options-card {
        flex-direction: column;
        gap: 1.5rem;
    }
}