* { box-sizing: border-box; margin: 0; padding: 0; }
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background: #0b1020; color: #e0e0e0;
    min-height: 100vh; display: flex; flex-direction: column; align-items: center;
    padding: 2rem 1rem;
}
h1 { color: #60a5fa; margin-bottom: 1.5rem; }
.container { width: 100%; max-width: 900px; }
.hidden { display: none !important; }

form, .card {
    background: #111a33; border-radius: 12px; padding: 1.5rem; margin-bottom: 1.5rem;
}
label { display: block; font-weight: 600; margin-bottom: 0.3rem; color: #93c5fd; }
textarea {
    width: 100%; min-height: 100px; padding: 0.75rem;
    border: 1px solid #334155; border-radius: 8px;
    background: #0f172a; color: #e0e0e0; font-size: 1rem;
    resize: vertical; margin-bottom: 1rem;
}
textarea:focus, input:focus { outline: none; border-color: #60a5fa; }
select, input[type="file"], input[type="password"] {
    width: 100%; padding: 0.5rem; border: 1px solid #334155; border-radius: 8px;
    background: #0f172a; color: #e0e0e0; margin-bottom: 1rem;
}
button {
    background: #2563eb; color: #fff; border: none; padding: 0.75rem 2rem;
    border-radius: 8px; font-size: 1rem; cursor: pointer; width: 100%;
}
button:hover { background: #1d4ed8; }
button:disabled { background: #555; cursor: not-allowed; }
button.secondary { background: #334155; margin-top: 0.5rem; }
button.secondary:hover { background: #475569; }

.result-card {
    background: #111a33; border-radius: 12px; padding: 1.5rem; margin-bottom: 1rem;
}
.result-card h3 {
    color: #60a5fa; margin-bottom: 0.5rem;
    display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap;
}
.result-content {
    white-space: pre-wrap; line-height: 1.6; background: #0f172a;
    padding: 1rem; border-radius: 8px; max-height: 400px; overflow-y: auto;
    margin-bottom: 0.5rem;
}
.result-images img {
    max-width: 100%; max-height: 500px; border-radius: 8px; margin: 0.5rem 0;
    border: 1px solid #334155;
}
.result-images a { display: inline-block; }
.result-error { color: #f87171; }
.file-count { color: #94a3b8; font-size: 0.9rem; margin-bottom: 1rem; }
#results { margin-top: 1rem; }
#zipBar { margin-bottom: 1rem; }
.dl-link { display: inline-block; margin: 0.25rem 0.5rem 0 0; color: #93c5fd; font-size: 0.85rem; }
.badge {
    font-size: 0.7rem; font-weight: 600; text-transform: uppercase;
    padding: 0.2rem 0.6rem; border-radius: 999px; letter-spacing: 0.03em;
}
.badge-queued { background: #475569; color: #e0e0e0; }
.badge-gen { background: #f59e0b; color: #0b1020; }
.badge-gen::after { content: " \2026"; }
.badge-done { background: #10b981; color: #fff; }
.badge-err { background: #ef4444; color: #fff; }
.spinner {
    display: inline-block; width: 14px; height: 14px;
    border: 2px solid #334155; border-top-color: #f59e0b;
    border-radius: 50%; animation: spin 0.8s linear infinite;
    vertical-align: middle;
}
@keyframes spin { to { transform: rotate(360deg); } }
.regen-btn {
    width: auto; padding: 0.4rem 1rem; font-size: 0.85rem;
    background: #475569; margin-top: 0.75rem;
}
.regen-btn:hover { background: #64748b; }
.input-thumb {
    max-height: 80px; border-radius: 6px; border: 1px solid #334155;
    margin-bottom: 0.5rem;
}
.hint { color: #94a3b8; font-size: 0.8rem; margin-top: -0.5rem; margin-bottom: 0.8rem; }
