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

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

.container {
    max-width: 1200px;
    margin: 0 auto;
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    overflow: hidden;
}

.header {
    background: linear-gradient(135deg, #2c3e50, #3498db);
    color: white;
    padding: 30px;
    text-align: center;
}

.header h1 {
    font-size: 2.2em;
    margin-bottom: 10px;
}

.main-content {
    padding: 30px;
}

.upload-section {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 15px;
    border: 2px dashed #dee2e6;
    margin-bottom: 20px;
}

.upload-area {
    border: 3px dashed #3498db;
    padding: 40px 20px;
    text-align: center;
    border-radius: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #f8f9fa;
    margin-bottom: 20px;
}

.upload-area:hover {
    background: #e3f2fd;
    border-color: #2980b9;
}

.file-info {
    background: white;
    padding: 15px;
    border-radius: 10px;
    margin: 15px 0;
    border-left: 4px solid #3498db;
}

.conversion-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 10px;
    margin: 15px 0;
}

.conversion-btn {
    background: #3498db;
    color: white;
    border: none;
    padding: 12px 15px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: bold;
    font-size: 0.9em;
}

.conversion-btn:hover:not(:disabled) {
    background: #2980b9;
    transform: translateY(-2px);
}

.conversion-btn:disabled {
    background: #bdc3c7;
    cursor: not-allowed;
}

.conversion-btn.active {
    background: #27ae60;
}

.conversion-btn.edit {
    background: #e74c3c;
}

.conversion-btn.edit:hover:not(:disabled) {
    background: #c0392b;
}

.action-buttons {
    display: flex;
    gap: 10px;
    margin-top: 15px;
    flex-wrap: wrap;
}

.btn {
    padding: 12px 20px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.95em;
    font-weight: bold;
    transition: all 0.3s ease;
    flex: 1;
    min-width: 120px;
}

.btn-primary {
    background: #3498db;
    color: white;
}

.btn-primary:hover:not(:disabled) {
    background: #2980b9;
}

.btn-secondary {
    background: #95a5a6;
    color: white;
}

.btn-secondary:hover {
    background: #7f8c8d;
}

.btn-success {
    background: #27ae60;
    color: white;
}

.btn-success:hover {
    background: #219a52;
}

.btn-danger {
    background: #e74c3c;
    color: white;
}

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

.btn:disabled {
    background: #bdc3c7;
    cursor: not-allowed;
}

.status {
    margin: 15px 0;
    padding: 12px;
    border-radius: 6px;
    display: none;
}

.status.success {
    background: #d4ffd4;
    border: 1px solid #27ae60;
    color: #155724;
    display: block;
}

.status.error {
    background: #ffd4d4;
    border: 1px solid #e74c3c;
    color: #721c24;
    display: block;
}

.status.info {
    background: #d4eaff;
    border: 1px solid #3498db;
    color: #004085;
    display: block;
}

.download-section {
    text-align: center;
    padding: 20px;
    display: none;
}

.download-link {
    display: inline-block;
    background: #27ae60;
    color: white;
    padding: 12px 25px;
    text-decoration: none;
    border-radius: 6px;
    font-weight: bold;
    transition: all 0.3s ease;
    margin: 5px;
}

.download-link:hover {
    background: #219a52;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: #ecf0f1;
    border-radius: 4px;
    margin: 10px 0;
    overflow: hidden;
    display: none;
}

.progress {
    width: 0%;
    height: 100%;
    background: #3498db;
    transition: width 0.3s ease;
}

/* PDF Editor Styles */
.editor-section {
    display: none;
    margin-top: 20px;
    background: #f8f9fa;
    padding: 20px;
    border-radius: 15px;
    border: 2px solid #e9ecef;
}

.text-editor {
    width: 100%;
    min-height: 300px;
    padding: 15px;
    border: 2px solid #dee2e6;
    border-radius: 8px;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    line-height: 1.6;
    resize: vertical;
    background: white;
}

.editor-actions {
    display: flex;
    gap: 10px;
    margin-top: 15px;
    flex-wrap: wrap;
}

.preview-section {
    margin-top: 20px;
    background: white;
    padding: 15px;
    border-radius: 10px;
    border-left: 4px solid #e74c3c;
}

.preview-canvas {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding: 10px 0;
}

.preview-canvas canvas {
    border: 1px solid #dee2e6;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.supported-formats {
    background: white;
    padding: 25px;
    border-radius: 15px;
    margin-top: 20px;
}

.format-category {
    margin-bottom: 15px;
}

.format-category h3 {
    color: #2c3e50;
    margin-bottom: 8px;
    border-bottom: 2px solid #3498db;
    padding-bottom: 5px;
}

.format-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 8px;
}

.format-item {
    background: white;
    padding: 8px;
    text-align: center;
    border-radius: 6px;
    border: 1px solid #e9ecef;
    font-weight: bold;
    color: #495057;
    font-size: 0.85em;
}

.tab-buttons {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.tab-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    background: #ecf0f1;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease;
}

.tab-btn.active {
    background: #3498db;
    color: white;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}
