/* PDF Converter Styles */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #2563eb;
    --primary-hover: #1d4ed8;
    --secondary-color: #64748b;
    --success-color: #22c55e;
    --danger-color: #ef4444;
    --bg-color: #f8fafc;
    --card-bg: #ffffff;
    --text-color: #1e293b;
    --border-color: #e2e8f0;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: var(--text-color);
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Header */
.header {
    text-align: center;
    color: white;
    margin-bottom: 40px;
    animation: fadeInDown 0.5s ease;
}

.header h1 {
    font-size: 3rem;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

.subtitle {
    font-size: 1.2rem;
    opacity: 0.9;
}

/* Main Content */
.main-content {
    background: var(--card-bg);
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: fadeInUp 0.5s ease;
}

/* Upload Section */
.upload-section {
    margin-bottom: 30px;
}

.upload-area {
    border: 3px dashed var(--border-color);
    border-radius: 15px;
    padding: 60px 40px;
    text-align: center;
    transition: all 0.3s ease;
    background: var(--bg-color);
    cursor: pointer;
}

.upload-area:hover,
.upload-area.dragover {
    border-color: var(--primary-color);
    background: #eff6ff;
    transform: scale(1.02);
}

.upload-icon {
    font-size: 4rem;
    margin-bottom: 20px;
}

.upload-area h2 {
    color: var(--text-color);
    margin-bottom: 10px;
}

.upload-limits {
    color: var(--secondary-color);
    font-size: 0.9rem;
    margin: 10px 0;
}

/* Buttons */
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.4);
}

.btn-secondary {
    background: var(--secondary-color);
    color: white;
}

.btn-secondary:hover {
    background: #475569;
}

.btn-danger {
    background: var(--danger-color);
    color: white;
}

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

.btn-op {
    background: var(--success-color);
    color: white;
    width: 100%;
    margin-top: 15px;
}

.btn-op:hover {
    background: #16a34a;
    transform: translateY(-2px);
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* Section Headers */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.section-header h2 {
    color: var(--text-color);
}

/* File List */
.file-list-section {
    margin-bottom: 30px;
}

.file-list {
    display: grid;
    gap: 15px;
}

.file-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px;
    background: var(--bg-color);
    border-radius: 10px;
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.file-item:hover {
    border-color: var(--primary-color);
    transform: translateX(5px);
}

.file-item.selected {
    border-color: var(--primary-color);
    background: #eff6ff;
}

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

.file-checkbox {
    width: 20px;
    height: 20px;
    accent-color: var(--primary-color);
}

.file-icon {
    font-size: 2rem;
}

.file-details h3 {
    font-size: 1rem;
    margin-bottom: 5px;
}

.file-meta {
    font-size: 0.85rem;
    color: var(--secondary-color);
}

.file-actions {
    display: flex;
    gap: 10px;
}

.btn-small {
    padding: 8px 16px;
    font-size: 0.85rem;
}

/* Operations Section */
.operations-section {
    margin-bottom: 30px;
}

.operations-section h2 {
    margin-bottom: 20px;
    color: var(--text-color);
}

.operations-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    align-items: start;
}

.operation-card {
    background: var(--bg-color);
    border-radius: 15px;
    padding: 25px;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.operation-card:hover {
    border-color: var(--primary-color);
    transform: translateY(-5px);
    box-shadow: var(--shadow);
}

.op-icon {
    font-size: 3rem;
    margin-bottom: 15px;
}

.operation-card h3 {
    margin-bottom: 10px;
    color: var(--text-color);
}

.operation-card p {
    color: var(--secondary-color);
    font-size: 0.9rem;
    margin-bottom: 15px;
}

.op-options {
    margin: 15px 0;
    padding: 15px;
    background: white;
    border-radius: 10px;
}

.radio-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 15px;
}

.radio-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.input-group {
    margin-bottom: 15px;
}

.input-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    font-size: 0.9rem;
}

.text-input,
.select-input {
    width: 100%;
    padding: 10px 15px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.text-input:focus,
.select-input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.slider {
    width: 100%;
    height: 8px;
    border-radius: 4px;
    background: var(--border-color);
    outline: none;
    accent-color: var(--primary-color);
}

.info-text {
    font-size: 0.85rem;
    color: var(--secondary-color);
    font-style: italic;
}

/* Results Section */
.results-section {
    margin-bottom: 30px;
}

.results-section h2 {
    margin-bottom: 20px;
    color: var(--success-color);
}

.results-list {
    display: grid;
    gap: 15px;
}

.result-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px;
    background: #f0fdf4;
    border-radius: 10px;
    border: 2px solid var(--success-color);
}

.result-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.result-icon {
    font-size: 2rem;
}

/* Session Section */
.session-section {
    padding: 20px;
    background: #fef2f2;
    border-radius: 10px;
    text-align: center;
    margin-top: 30px;
}

/* Footer */
.footer {
    text-align: center;
    color: white;
    margin-top: 30px;
    opacity: 0.8;
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-content {
    background: white;
    border-radius: 15px;
    padding: 30px;
    max-width: 90%;
    max-height: 90%;
    overflow: auto;
    position: relative;
}

.modal-content-large {
    width: 90vw;
    height: 90vh;
    max-width: 1400px;
    padding: 0;
    display: flex;
    flex-direction: column;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 30px;
    border-bottom: 1px solid var(--border-color);
}

.modal-header h2 {
    margin: 0;
}

.modal-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

.preview-container {
    flex: 1;
    overflow: hidden;
    position: relative;
    background: #525659;
}

.close {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 2rem;
    cursor: pointer;
    color: var(--secondary-color);
    z-index: 10;
}

.close:hover {
    color: var(--danger-color);
}

.preview-frame {
    width: 100%;
    height: 100%;
    border: none;
    display: block;
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    color: white;
}

.spinner {
    width: 60px;
    height: 60px;
    border: 5px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }

    .header h1 {
        font-size: 2rem;
    }

    .main-content {
        padding: 20px;
    }

    .operations-grid {
        grid-template-columns: 1fr;
    }

    .upload-area {
        padding: 40px 20px;
    }

    .section-header {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }
}
