:root {
    --bg: #0f172a;
    --card: #ffffff;
    --accent: #2563eb;
    --accent-dark: #1d4ed8;
    --ok-bg: #ecfdf5;
    --ok-bd: #10b981;
    --err-bg: #fef2f2;
    --err-bd: #ef4444;
    --muted: #64748b;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    min-height: 100vh;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    background: linear-gradient(160deg, #1e293b, #0f172a);
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    color: #0f172a;
    padding: 48px 16px;
}

.card {
    background: var(--card);
    width: 100%;
    max-width: 640px;
    border-radius: 18px;
    padding: 36px 40px 40px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, .35);
}

h1 {
    margin: 0;
    font-size: 1.6rem;
}

.sub {
    margin: 6px 0 26px;
    color: var(--muted);
}

h2 {
    font-size: 1.1rem;
    margin: 28px 0 12px;
}

.uploader {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.drop {
    border: 2px dashed #cbd5e1;
    border-radius: 14px;
    padding: 34px 20px;
    text-align: center;
    cursor: pointer;
    transition: border-color .15s, background .15s;
}
.drop:hover { border-color: var(--accent); background: #f8fafc; }
.drop span { display: block; margin-top: 10px; color: var(--muted); font-weight: 600; }
.drop input { display: block; margin: 0 auto; }

.btn {
    display: inline-block;
    background: #f1f5f9;
    color: #0f172a;
    text-decoration: none;
    padding: 11px 18px;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    font-weight: 600;
    cursor: pointer;
    transition: background .15s, transform .05s;
}
.btn:hover { background: #e2e8f0; }
.btn:active { transform: translateY(1px); }

.btn.primary {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent-dark);
    font-size: 1rem;
    padding: 12px 22px;
}
.btn.primary:hover { background: var(--accent-dark); }

.note {
    margin-top: 20px;
    color: var(--muted);
    font-size: .9rem;
    line-height: 1.5;
}
.note code {
    background: #f1f5f9;
    padding: 1px 5px;
    border-radius: 5px;
    font-size: .85em;
}

.alert {
    border-radius: 10px;
    padding: 14px 16px;
    margin-bottom: 18px;
}
.alert.ok    { background: var(--ok-bg);  border: 1px solid var(--ok-bd); }
.alert.error { background: var(--err-bg); border: 1px solid var(--err-bd); }
.alert.info  { background: #eff6ff; border: 1px solid #93c5fd; }
.alert.warn  { background: #fffbeb; border: 1px solid #fcd34d; color: #78350f; }
.disclaimer {
    margin-top: 26px;
    font-size: .9rem;
    line-height: 1.5;
    color: #1e3a5f;
}
.alert pre {
    margin: 8px 0 0;
    white-space: pre-wrap;
    font-size: .85rem;
}

/* Live-Fortschritt während der Konvertierung */
.progress { margin-bottom: 18px; }
.progress-head {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}
.spinner {
    flex: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 2px solid #cbd5e1;
    border-top-color: #2563eb;
    animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.console {
    margin: 0 0 4px;
    padding: 12px 14px;
    background: #0f172a;
    color: #e2e8f0;
    border-radius: 10px;
    font: .8rem/1.45 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    max-height: 320px;
    overflow: auto;
    white-space: pre-wrap;
    word-break: break-word;
}

.downloads { list-style: none; padding: 0; margin: 0; }
.downloads li {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
    padding: 10px 0;
    border-bottom: 1px solid #f1f5f9;
}
.downloads .hint { color: var(--muted); font-size: .85rem; }

.summary {
    width: 100%;
    border-collapse: collapse;
    margin-top: 4px;
}
.summary td {
    padding: 10px 4px;
    border-bottom: 1px solid #f1f5f9;
}
.summary td.num {
    text-align: right;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
    font-weight: 600;
}
.summary tr.net td {
    border-top: 2px solid #cbd5e1;
    border-bottom: none;
    font-size: 1.05rem;
    font-weight: 700;
    padding-top: 14px;
}

.again {
    display: inline-block;
    margin-top: 22px;
    color: var(--accent);
    text-decoration: none;
    font-weight: 600;
}
.again:hover { text-decoration: underline; }

.help,
.converter {
    margin-top: 34px;
    padding-top: 24px;
    border-top: 1px solid #e2e8f0;
}
.converter .sub { margin-bottom: 18px; }
.help .sub { margin-bottom: 16px; }
.help-img {
    display: block;
    width: 100%;
    height: auto;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, .12);
}
