/* ── Reset ────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* ── Basis ────────────────────────────────────── */
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
    background: #f0f2f5;
    color: #1a1a2e;
    min-height: 100vh;
    padding: 24px 16px 48px;
    line-height: 1.5;
}

/* ── Layout ───────────────────────────────────── */
.app {
    max-width: 720px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* ── Header ───────────────────────────────────── */
.header {
    text-align: center;
    padding: 8px 0 4px;
}

.header h1 {
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: -0.5px;
    color: #1a1a2e;
}

.tagline {
    color: #666;
    font-size: 1rem;
    margin-top: 6px;
}

/* ── Drop-Zone ────────────────────────────────── */
.drop-zone {
    background: #fff;
    border: 3px dashed #c8cdd6;
    border-radius: 20px;
    padding: 56px 32px;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
}

.drop-zone.active {
    border-color: #3b82f6;
    background: #eff6ff;
}

.drop-icon {
    font-size: 3.5rem;
    line-height: 1;
    color: #3b82f6;
    margin-bottom: 16px;
}

.drop-label {
    font-size: 1.25rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
}

.drop-sub {
    font-size: 0.9rem;
    color: #888;
    margin-bottom: 24px;
}

/* ── Buttons ──────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    padding: 12px 24px;
    transition: background 0.15s, transform 0.1s, opacity 0.15s;
    -webkit-tap-highlight-color: transparent;
}

.btn:active { transform: scale(0.97); }

.btn-primary {
    background: #3b82f6;
    color: #fff;
}
.btn-primary:hover { background: #2563eb; }

.btn-ghost {
    background: transparent;
    color: #888;
    font-size: 0.875rem;
    padding: 6px 12px;
    font-weight: 500;
}
.btn-ghost:hover { background: #f0f2f5; color: #444; }

.btn-export {
    width: 100%;
    padding: 18px;
    background: #16a34a;
    color: #fff;
    font-size: 1.1rem;
    border-radius: 14px;
    letter-spacing: 0.2px;
}
.btn-export:hover { background: #15803d; }
.btn-export:disabled {
    background: #9ca3af;
    cursor: not-allowed;
    transform: none;
}

/* ── Dateiliste Section ───────────────────────── */
.file-section,
.export-section {
    background: #fff;
    border-radius: 20px;
    padding: 24px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.section-header h2 {
    font-size: 1rem;
    font-weight: 600;
    color: #555;
}

/* ── Datei-Einträge ───────────────────────────── */
.file-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.file-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 14px;
    background: #f8f9fb;
    border-radius: 12px;
    border: 2px solid transparent;
    cursor: grab;
    transition: box-shadow 0.15s, border-color 0.15s, opacity 0.15s;
    user-select: none;
}

.file-item:hover { box-shadow: 0 2px 8px rgba(0,0,0,0.08); }
.file-item.dragging { opacity: 0.4; cursor: grabbing; }
.file-item.drop-target { border-color: #3b82f6; background: #eff6ff; }

/* Vorschau */
.file-thumb {
    width: 52px;
    height: 52px;
    object-fit: cover;
    border-radius: 8px;
    flex-shrink: 0;
    background: #e5e7eb;
}

.file-thumb-text {
    width: 52px;
    height: 52px;
    border-radius: 8px;
    background: #e0e7ff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    flex-shrink: 0;
}

/* Datei-Info */
.file-info {
    flex: 1;
    min-width: 0;
}

.file-name {
    font-weight: 600;
    font-size: 0.95rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: #1a1a2e;
}

.file-meta {
    font-size: 0.8rem;
    color: #999;
    margin-top: 2px;
}

/* Steuer-Buttons */
.file-controls {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
}

.ctrl-btn {
    width: 34px;
    height: 34px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    background: #fff;
    cursor: pointer;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s, border-color 0.15s;
    color: #555;
    padding: 0;
}

.ctrl-btn:hover { background: #f0f2f5; border-color: #bbb; }

.ctrl-btn.delete:hover {
    background: #fff1f2;
    border-color: #fca5a5;
    color: #dc2626;
}

/* ── Export-Bereich ───────────────────────────── */
.setting-row {
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.setting-row label {
    font-weight: 600;
    font-size: 0.9rem;
    color: #555;
}

.setting-row input {
    padding: 12px 14px;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    font-size: 1rem;
    color: #1a1a2e;
    transition: border-color 0.2s;
    outline: none;
}

.setting-row input:focus { border-color: #3b82f6; }

.export-hint {
    text-align: center;
    margin-top: 14px;
    font-size: 0.9rem;
    color: #888;
    min-height: 1.4em;
}

/* ── Footer ───────────────────────────────────── */
.footer {
    text-align: center;
    font-size: 0.82rem;
    color: #aaa;
}

/* ── Responsive ───────────────────────────────── */
@media (max-width: 480px) {
    .drop-zone { padding: 40px 20px; }
    .header h1 { font-size: 1.6rem; }
    .file-item { gap: 10px; }
    .file-thumb,
    .file-thumb-text { width: 44px; height: 44px; }
}
