:root {
    font-family: system-ui, -apple-system, sans-serif;
    line-height: 1.5;
    color: #111;
    background: #fff;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

body {
    min-height: 100vh;
}

.app {
    min-height: 100vh;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 2rem 1rem;
    background: #ffffff;
}

.card {
    width: 100%;
    max-width: 780px;
    text-align: center;
}

.header-row {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    margin-bottom: 1.25rem;
}

.header-spacer {
    min-width: 5.55rem;
}

.language-switch {
    display: flex;
    gap: 0.35rem;
    justify-self: end;
}

.language-switch button {
    width: 2.6rem;
    height: 2.35rem;
    border: 1px solid #ddd;
    border-radius: 8px;
    background: #fff;
    color: #777;
    font-size: 0.82rem;
    font-weight: 700;
    cursor: pointer;
}

.language-switch a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.6rem;
    height: 2.35rem;
    border: 1px solid #ddd;
    border-radius: 8px;
    background: #fff;
    color: #777;
    font-size: 0.82rem;
    font-weight: 700;
    text-decoration: none;
}

.language-switch button.active {
    border-color: #333;
    background: #333;
    color: #fff;
}

.language-switch a.active {
    border-color: #333;
    background: #333;
    color: #fff;
}

.language-switch button:disabled {
    cursor: default;
}

.title {
    font-size: 1.35rem;
    font-weight: 600;
    margin: 0;
    color: #111;
    letter-spacing: -0.02em;
}

/* ---- Drop-Zone ---- */

.drop-zone {
    border: 2px dashed #d0d0d0;
    border-radius: 10px;
    padding: 2rem 1rem;
    margin-bottom: 0.5rem;
    transition: border-color 0.2s, background 0.2s;
    cursor: pointer;
}

.drop-zone.drag-over {
    border-color: #888;
    background: #f7f7f7;
}

.drop-label {
    font-size: 0.95rem;
    color: #555;
    margin: 0 0 0.35rem;
}

.drop-sublabel {
    font-size: 0.78rem;
    color: #aaa;
    margin: 0 0 0.6rem;
}

.privacy-note {
    margin-top: 0.85rem;
    font-size: 0.72rem;
    color: #aaa;
}

.privacy-note a {
    color: inherit;
    text-decoration: none;
}

.privacy-note a:hover {
    color: #666;
    text-decoration: underline;
}

.browse-btn {
    display: inline-block;
    padding: 0.45rem 1.1rem;
    font-size: 0.82rem;
    color: #fff;
    background: #444;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.15s;
}

.browse-btn:hover {
    background: #222;
}

.file-input {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ---- Loading ---- */

.loading {
    margin-top: 0.75rem;
    font-size: 0.82rem;
    color: #999;
}

/* ---- Fehler ---- */

.error {
    margin-top: 0.75rem;
    font-size: 0.82rem;
    color: #c00;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 6px;
    padding: 0.6rem 1rem;
}

/* ---- Status-Zusammenfassung ---- */

.summary {
    margin: 1rem 0;
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.summary-file {
    font-size: 0.82rem;
    color: #666;
    margin: 0;
}

.summary-count {
    font-size: 0.9rem;
    font-weight: 600;
    color: #333;
    margin: 0;
}

.summary-tz {
    font-size: 0.72rem;
    color: #aaa;
    margin: 0;
}

/* ---- Export-Button ---- */

.export-btn {
    display: inline-block;
    margin-top: 0.75rem;
    padding: 0.55rem 1.75rem;
    font-size: 0.9rem;
    font-weight: 600;
    color: #fff;
    background: #2563eb;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.15s;
}

.export-btn:hover {
    background: #1d4ed8;
}

/* ---- Vorschau-Toggle ---- */

.preview-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    margin-top: 0.65rem;
    font-size: 0.8rem;
    color: #888;
    cursor: pointer;
    user-select: none;
}

.preview-toggle input[type='checkbox'] {
    accent-color: #2563eb;
    cursor: pointer;
}

/* ---- Vorschau-Bereich ---- */

.preview {
    margin-top: 1.25rem;
    text-align: left;
    border-top: 1px solid #eee;
    padding-top: 1rem;
}

.result h2 {
    font-size: 0.78rem;
    font-weight: 600;
    color: #555;
    margin: 0 0 0.4rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.table-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    max-height: 360px;
    overflow-y: auto;
    border-radius: 6px;
    border: 1px solid #eee;
}

.result table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.76rem;
    color: #333;
}

.result th,
.result td {
    padding: 0.35rem 0.5rem;
    border-bottom: 1px solid #f0f0f0;
    text-align: left;
    white-space: nowrap;
}

.result th {
    font-weight: 600;
    color: #777;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    position: sticky;
    top: 0;
    background: #fafafa;
}

/* ---- Footer ---- */

.app-footer {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.55rem;
    margin-top: 1.5rem;
    padding-bottom: 0.5rem;
    font-size: 0.78rem;
    color: #aaa;
}

.app-footer a {
    color: #666;
    text-decoration: none;
    transition: color 0.15s;
}

.app-footer a:hover {
    color: #333;
    text-decoration: underline;
}

/* ---- Datenschutz ---- */

.privacy-page {
    text-align: left;
}

.privacy-page .title {
    text-align: center;
}

.back-link {
    justify-self: start;
    color: #777;
    font-size: 0.82rem;
    text-decoration: none;
}

.back-link:hover {
    color: #333;
    text-decoration: underline;
}

.privacy-intro,
.privacy-page p {
    color: #555;
    font-size: 0.9rem;
}

.privacy-page section {
    margin-top: 1.25rem;
}

.privacy-page h2 {
    margin-bottom: 0.25rem;
    color: #222;
    font-size: 0.92rem;
}

.privacy-note-text {
    margin-top: 1.5rem;
    color: #888;
    font-size: 0.78rem;
}
