:root {
    --primary: #6366f1;
    --primary-hover: #4f46e5;
    --bg-main: #f8fafc;
    --bg-card: #ffffff;
    --text-main: #1e293b;
    --text-muted: #64748b;
    --border: #e2e8f0;
    --success: #22c55e;
    --danger: #ef4444;
    --radius: 12px;
}

* { box-sizing: border-box; margin: 0; padding: 0; font-family: 'Segoe UI', system-ui, sans-serif; }

body { background: var(--bg-main); color: var(--text-main); line-height: 1.6; display: flex; flex-direction: column; min-height: 100vh; }

.navbar { display: flex; justify-content: space-between; padding: 1.2rem 2rem; background: var(--bg-card); box-shadow: 0 1px 3px rgba(0,0,0,0.05); }
.nav-brand { font-weight: 700; font-size: 1.2rem; color: var(--primary); }
.nav-links a { margin-left: 1.5rem; text-decoration: none; color: var(--text-muted); font-weight: 500; }
.nav-links a:hover { color: var(--primary); }

.container { max-width: 800px; margin: 3rem auto; padding: 0 1.5rem; flex: 1; }
.header { margin-bottom: 2rem; }
.header h1 { font-size: 2.5rem; margin-bottom: 0.5rem; }

.system-status { text-align: center; margin-bottom: 1.5rem; font-size: 0.9rem; }
.status-badge { display: inline-block; padding: 0.3rem 0.8rem; border-radius: 20px; font-weight: 600; }
.status-badge.ready { background: #dcfce7; color: #166534; }
.status-badge.error { background: #fee2e2; color: #991b1b; }
.status-details { margin-top: 0.5rem; display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; color: var(--text-muted); font-size: 0.85rem; }

.converter-card { background: var(--bg-card); border-radius: var(--radius); box-shadow: 0 10px 25px rgba(0,0,0,0.05); padding: 2.5rem; position: relative; }
.step-section { display: none; }
.step-section.active { display: block; animation: fadeIn 0.3s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

.drop-zone { border: 2px dashed var(--border); border-radius: var(--radius); padding: 3rem 1.5rem; text-align: center; cursor: pointer; transition: 0.2s; background: #f8fafc; }
.drop-zone.dragover { border-color: var(--primary); background: #e0e7ff; }
.drop-icon { font-size: 3rem; margin-bottom: 1rem; }
.file-info { font-size: 0.85rem; color: var(--text-muted); margin-top: 1rem; }

.btn { padding: 0.8rem 1.5rem; border: none; border-radius: 8px; font-weight: 600; cursor: pointer; transition: 0.2s; display: inline-block; text-decoration: none; }
.btn-primary { background: var(--primary); color: white; }
.btn-primary:hover { background: var(--primary-hover); }
.btn-secondary { background: #e2e8f0; color: var(--text-main); }
.btn-secondary:hover { background: #cbd5e1; }
.btn-block { width: 100%; font-size: 1.1rem; }
.btn-text { background: none; border: none; cursor: pointer; font-weight: 600; }
.text-danger { color: var(--danger); }
.text-success { color: var(--success); }
.text-muted { color: var(--text-muted); }
.text-center { text-align: center; }
.mt-2 { margin-top: 0.5rem; } .mt-4 { margin-top: 1.5rem; } .mb-2 { margin-bottom: 0.5rem; } .mb-4 { margin-bottom: 1.5rem; }

.selected-file-info { display: flex; align-items: center; justify-content: space-between; padding: 1rem; background: #f1f5f9; border-radius: 8px; margin-bottom: 1.5rem; }
.badge { background: var(--border); padding: 0.2rem 0.5rem; border-radius: 4px; font-size: 0.85rem; }

.advanced-settings { background: #f8fafc; border: 1px solid var(--border); border-radius: 8px; padding: 1rem; margin-bottom: 1.5rem; }
.advanced-settings summary { font-weight: 600; cursor: pointer; outline: none; }
.settings-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-top: 1rem; }
.form-group { display: flex; flex-direction: column; }
.form-group.full-width { grid-column: 1 / -1; }
.form-group label { font-size: 0.9rem; font-weight: 600; margin-bottom: 0.3rem; }
.form-group input, .form-group select { padding: 0.6rem; border: 1px solid var(--border); border-radius: 6px; font-size: 0.95rem; }
.form-group small { color: var(--text-muted); font-size: 0.8rem; margin-top: 0.3rem; }

.progress-bar-bg { background: var(--border); height: 12px; border-radius: 10px; overflow: hidden; margin-top: 1.5rem; }
.progress-bar-fill { background: var(--primary); height: 100%; width: 0%; transition: width 0.3s ease; }

.result-stats { background: #f1f5f9; padding: 1.5rem; border-radius: 8px; text-align: left; font-size: 0.95rem; }
.result-stats p { margin-bottom: 0.5rem; display: flex; justify-content: space-between; border-bottom: 1px solid var(--border); padding-bottom: 0.2rem; }

.footer { text-align: center; padding: 2rem; color: var(--text-muted); font-size: 0.9rem; margin-top: auto; }

@media (max-width: 600px) {
    .settings-grid { grid-template-columns: 1fr; }
    .navbar { flex-direction: column; align-items: center; gap: 10px; }
}