/* PDF to XML Converter - Modern CSS Styles */
:root {
    --primary-color: #4361ee;
    --primary-light: #4895ef;
    --secondary-color: #3f37c9;
    --accent-color: #f72585;
    --success-color: #4caf50;
    --warning-color: #ff9800;
    --error-color: #f44336;
    --text-dark: #333333;
    --text-light: #666666;
    --text-lighter: #999999;
    --bg-light: #f8f9fa;
    --bg-white: #ffffff;
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
    --border-radius-sm: 4px;
    --border-radius-md: 8px;
    --border-radius-lg: 12px;
    --border-color: #e0e0e0;
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--bg-light);
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
}

h1 {
    font-size: 2.5rem;
}

h2 {
    font-size: 2rem;
}

h3 {
    font-size: 1.5rem;
}

p {
    margin-bottom: 1rem;
}

.highlight {
    color: var(--accent-color);
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--primary-light);
}

/* Hero Section */
.hero {
    padding: 4rem 0;
    text-align: center;
}

.subtitle {
    font-size: 1.25rem;
    color: var(--text-light);
    max-width: 700px;
    margin: 0 auto 2rem;
}

/* Converter Card */
.converter-card {
    background-color: var(--bg-white);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-lg);
    padding: 2rem;
    margin: 2rem auto;
    max-width: 900px;
}

/* Upload Area */
.upload-area {
    border: 2px dashed var(--primary-color);
    border-radius: var(--border-radius-md);
    padding: 2.5rem;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    margin-bottom: 1.5rem;
    background-color: rgba(67, 97, 238, 0.05);
    box-shadow: var(--shadow-md);
}

.upload-area:hover {
    border-color: var(--primary-color);
    background-color: rgba(67, 97, 238, 0.1);
}

.upload-area.active, .upload-area.highlight {
    border-color: var(--primary-color);
    background-color: rgba(67, 97, 238, 0.1);
}

.upload-area i {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.upload-area h3 {
    margin-bottom: 0.5rem;
}

.upload-area p {
    margin-bottom: 1rem;
    color: var(--text-light);
}

.upload-btn {
    display: inline-block;
    background-color: var(--primary-color);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: var(--border-radius-md);
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}

.upload-btn:hover {
    background-color: var(--primary-light);
    transform: translateY(-2px);
}

/* File List */
.file-list-container {
    margin-bottom: 1.5rem;
}

.file-list {
    list-style: none;
    max-height: 200px;
    overflow-y: auto;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-md);
    padding: 0.5rem;
}

.file-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    border-bottom: 1px solid var(--border-color);
}

.file-list li:last-child {
    border-bottom: none;
}

.file-info {
    display: flex;
    align-items: center;
}

.file-icon {
    margin-right: 0.75rem;
    color: var(--primary-color);
}

.file-name {
    font-weight: 500;
}

.file-size {
    color: var(--text-lighter);
    font-size: 0.875rem;
    margin-left: 0.5rem;
}

.remove-file {
    color: var(--text-lighter);
    cursor: pointer;
    transition: var(--transition);
}

.remove-file:hover {
    color: var(--error-color);
}

/* Options Container */
.options-container {
    background-color: var(--bg-light);
    border-radius: var(--border-radius-md);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.option-group {
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
}

.option-group label {
    flex: 0 0 150px;
    font-weight: 500;
}

.option-group select,
.option-group input[type="text"] {
    flex: 1;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    font-family: inherit;
    transition: var(--transition);
}

.option-group select:focus,
.option-group input[type="text"]:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(67, 97, 238, 0.2);
}

.option-group.checkbox {
    display: flex;
    align-items: center;
}

.option-group.checkbox input[type="checkbox"] {
    margin-right: 0.5rem;
}

/* Checkbox Row Layout */
.option-group.checkbox-row {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 1rem 2rem;
    justify-content: space-between;
    margin-top: 1rem;
    margin-bottom: 1rem;
    background-color: var(--bg-white);
    padding: 1.25rem;
    border-radius: var(--border-radius-md);
    box-shadow: var(--shadow-sm);
}

.checkbox-item {
    display: flex;
    align-items: center;
    flex: 1 1 auto;
    min-width: 200px;
    padding: 0.5rem;
    border-radius: var(--border-radius-sm);
    transition: var(--transition);
}

.checkbox-item:hover {
    background-color: rgba(67, 97, 238, 0.05);
}

.checkbox-item input[type="checkbox"] {
    margin-right: 0.75rem;
    transform: scale(1.2);
    cursor: pointer;
}

/* Schema Selector */
.schema-selector {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    flex: 1;
}

.schema-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    padding: 0.75rem;
    border-radius: var(--border-radius-md);
    border: 2px solid transparent;
    transition: var(--transition);
}

.schema-option[data-selected="true"] {
    border-color: var(--primary-color);
    background-color: rgba(67, 97, 238, 0.05);
}

.schema-option:hover {
    background-color: rgba(67, 97, 238, 0.05);
}

.schema-preview {
    width: 80px;
    height: 50px;
    border-radius: var(--border-radius-sm);
    margin-bottom: 0.5rem;
    border: 1px solid var(--border-color);
    overflow: hidden;
    position: relative;
}

.auto-preview {
    background: linear-gradient(to bottom, #f8f9fa 0%, #f8f9fa 20%, #e9ecef 20%, #e9ecef 40%, #f8f9fa 40%, #f8f9fa 60%, #e9ecef 60%, #e9ecef 80%, #f8f9fa 80%, #f8f9fa 100%);
}

.auto-preview::before {
    content: '<>';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-family: monospace;
    color: var(--primary-color);
    font-weight: bold;
}

.document-preview {
    background-color: #f8f9fa;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    font-family: monospace;
    font-size: 8px;
    color: var(--text-dark);
    padding: 5px;
    line-height: 1.2;
}

.document-preview::before {
    content: '<doc>\n  <page>\n    <text>\n    </text>\n  </page>\n</doc>';
    white-space: pre;
}

.data-preview {
    background-color: #f8f9fa;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    font-family: monospace;
    font-size: 8px;
    color: var(--text-dark);
    padding: 5px;
    line-height: 1.2;
}

.data-preview::before {
    content: '<data>\n  <item>\n    <value>\n    </value>\n  </item>\n</data>';
    white-space: pre;
}

.custom-preview {
    background-color: #f8f9fa;
    display: flex;
    justify-content: center;
    align-items: center;
}

.custom-preview::before {
    content: '{ ... }';
    font-family: monospace;
    color: var(--text-dark);
    font-size: 12px;
}

/* Action Buttons */
.action-buttons {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.primary-btn,
.secondary-btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: var(--border-radius-md);
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    font-family: inherit;
    font-size: 1rem;
}

.primary-btn {
    background-color: var(--primary-color);
    color: white;
    flex: 1;
}

.primary-btn:hover:not(:disabled) {
    background-color: var(--primary-light);
    transform: translateY(-2px);
}

.secondary-btn {
    background-color: transparent;
    color: var(--text-light);
    border: 1px solid var(--border-color);
}

.secondary-btn:hover:not(:disabled) {
    background-color: var(--bg-light);
    color: var(--text-dark);
}

.primary-btn:disabled,
.secondary-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Progress Bar */
.progress-container {
    margin-bottom: 1.5rem;
}

.progress-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.progress-bar {
    height: 8px;
    background-color: var(--bg-light);
    border-radius: 4px;
    overflow: hidden;
}

.progress {
    height: 100%;
    background-color: var(--primary-color);
    width: 0;
    transition: width 0.3s ease;
}

/* Result Container */
.result-container {
    text-align: center;
    padding: 2rem;
    background-color: rgba(76, 175, 80, 0.1);
    border-radius: var(--border-radius-md);
}

.result-info {
    margin-bottom: 1.5rem;
}

.result-info i {
    font-size: 3rem;
    color: var(--success-color);
    margin-bottom: 1rem;
}

.download-links {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
    max-height: 200px;
    overflow-y: auto;
    padding: 1rem;
    background-color: var(--bg-white);
    border-radius: var(--border-radius-md);
    text-align: left;
}

.download-item {
    display: flex;
    flex-direction: column;
    padding: 1rem;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    transition: var(--transition);
}

.download-item:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.download-item .filename {
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.download-item .file-info {
    font-size: 0.75rem;
    color: var(--text-lighter);
    margin-bottom: 0.5rem;
}

.download-item .download-link {
    margin-top: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem;
    background-color: var(--primary-color);
    color: white;
    border-radius: var(--border-radius-sm);
    font-size: 0.875rem;
    transition: var(--transition);
}

.download-item .download-link:hover {
    background-color: var(--primary-light);
}

.download-item .download-link i {
    margin-right: 0.25rem;
}

/* XML Preview */
.preview-container {
    margin: 1.5rem 0;
    text-align: left;
}

.xml-preview {
    background-color: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-md);
    padding: 1rem;
    max-height: 300px;
    overflow-y: auto;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    white-space: pre-wrap;
    font-size: 0.875rem;
    line-height: 1.5;
    color: var(--text-dark);
}

.xml-tag {
    color: var(--primary-color);
}

.xml-attr {
    color: var(--accent-color);
}

.xml-value {
    color: var(--success-color);
}

.xml-comment {
    color: var(--text-lighter);
    font-style: italic;
}

.download-all-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: var(--success-color);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: var(--border-radius-md);
    font-weight: 500;
    border: none;
    cursor: pointer;
    transition: var(--transition);
    font-family: inherit;
    font-size: 1rem;
}

.download-all-btn:hover {
    background-color: #43a047;
    transform: translateY(-2px);
}

.download-all-btn i {
    margin-right: 0.5rem;
}

/* Features Section */
.features {
    padding: 4rem 0;
    background-color: var(--bg-white);
    text-align: center;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.feature-card {
    padding: 2rem;
    background-color: var(--bg-light);
    border-radius: var(--border-radius-lg);
    transition: var(--transition);
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.feature-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 70px;
    height: 70px;
    background-color: rgba(67, 97, 238, 0.1);
    color: var(--primary-color);
    border-radius: 50%;
    margin-bottom: 1.5rem;
}

.feature-icon i {
    font-size: 1.75rem;
}

.feature-card h3 {
    margin-bottom: 1rem;
}

.feature-card p {
    color: var(--text-light);
}

/* How It Works Section */
.how-it-works {
    padding: 4rem 0;
    text-align: center;
}

.steps {
    margin-top: 3rem;
    display: flex;
    flex-direction: column;
    gap: 2rem;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.step {
    display: flex;
    align-items: flex-start;
    text-align: left;
    gap: 1.5rem;
}

.step-number {
    flex-shrink: 0;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--primary-color);
    color: white;
    border-radius: 50%;
    font-weight: 700;
    font-size: 1.25rem;
}

.step-content h3 {
    margin-bottom: 0.5rem;
}

.step-content p {
    color: var(--text-light);
}

/* Notification System */
.notification-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
}

.notification {
    padding: 15px 20px;
    margin-bottom: 10px;
    border-radius: 4px;
    color: white;
    font-weight: 500;
    display: flex;
    align-items: center;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    animation: slideIn 0.3s ease, fadeOut 0.5s ease 2.5s forwards;
    max-width: 350px;
}

.notification.info {
    background-color: #4361ee;
}

.notification.success {
    background-color: #4caf50;
}

.notification.warning {
    background-color: #ff9800;
}

.notification.error {
    background-color: #f44336;
}

.notification i {
    margin-right: 10px;
}

@keyframes slideIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

@keyframes fadeOut {
    from { opacity: 1; }
    to { opacity: 0; }
}

/* Responsive Styles */
@media (max-width: 768px) {
    .hero {
        padding: 2rem 0;
    }
    
    h1 {
        font-size: 2rem;
    }
    
    .subtitle {
        font-size: 1rem;
    }
    
    .converter-card {
        padding: 1.5rem;
    }
    
    .option-group {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .option-group label {
        margin-bottom: 0.5rem;
    }
    
    .action-buttons {
        flex-direction: column;
    }
    
    .download-links {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }
    
    .schema-selector {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .feature-grid {
        grid-template-columns: 1fr;
    }
    
    .step {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    
    .download-links {
        grid-template-columns: 1fr;
    }
    
    .schema-option {
        flex: 0 0 calc(50% - 1rem);
    }
}
