:root {
    color-scheme: dark;
    --bg: #0f1117;
    --card: #171a23;
    --card-inner: #11131b;
    --border: #282e3d;
    --text: #f1f5f9;
    --muted: #94a3b8;
    --dim: #64748b;
    --accent: #e5383b;
    --accent-hover: #f24b4e;
    --green-bg: #11261b;
    --green-border: #22543d;
    --green-fg: #4ade80;
    --red-bg: #2a1418;
    --red-border: #7f1d1d;
    --red-fg: #f87171;
    --warn-bg: #291f11;
    --warn-border: #78350f;
    --warn-fg: #fbbf24;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    background: radial-gradient(circle at top center, #1d1520 0%, var(--bg) 52%);
    color: var(--text);
    font-family: "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
    line-height: 1.45;
    padding: 28px 18px 40px;
}

code {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.92em;
    background: rgba(255, 255, 255, 0.06);
    padding: 1px 5px;
    border-radius: 4px;
}

.hidden {
    display: none !important;
}

.shell {
    max-width: 820px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.hero {
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 6px 2px 8px;
}

.hero-icon {
    width: 74px;
    height: 74px;
    border-radius: 14px;
    border: 1px solid var(--border);
    object-fit: cover;
    flex-shrink: 0;
    box-shadow: 0 10px 26px rgba(0, 0, 0, 0.45);
}

.hero-copy h1 {
    margin: 6px 0 4px;
    font-size: 1.45rem;
    letter-spacing: 0.01em;
}

.hero-copy p {
    margin: 0;
    color: var(--muted);
    font-size: 0.92rem;
}

.hero-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.pill {
    display: inline-flex;
    align-items: center;
    font-size: 0.74rem;
    font-weight: 600;
    padding: 3px 9px;
    border-radius: 999px;
    background: #222735;
    color: #cbd5e1;
    border: 1px solid var(--border);
}

.pill-accent {
    background: rgba(229, 56, 59, 0.16);
    color: #fca5a5;
    border-color: rgba(229, 56, 59, 0.4);
}

.card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 16px 18px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}

.card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 12px;
}

.step-title {
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #cbd5e1;
}

.muted {
    font-size: 0.8rem;
    color: var(--muted);
}

.drop-zone {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 18px;
    border-radius: 10px;
    border: 1.5px dashed #384157;
    background: var(--card-inner);
    transition: border-color 0.15s ease, background 0.15s ease;
}

.drop-zone.drag-over {
    border-color: var(--accent);
    background: rgba(229, 56, 59, 0.08);
}

.drop-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: #202533;
    border: 1px solid var(--border);
    color: #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.85rem;
    flex-shrink: 0;
}

.drop-text {
    display: flex;
    flex-direction: column;
    gap: 3px;
    flex: 1;
}

.drop-text strong {
    font-size: 0.95rem;
}

.drop-text span {
    font-size: 0.82rem;
    color: var(--muted);
}

.drop-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.status-card {
    transition: background 0.15s ease, border-color 0.15s ease;
}

.status-title {
    font-size: 0.96rem;
    font-weight: 700;
}

.status-detail {
    margin-top: 4px;
    font-size: 0.85rem;
    color: var(--muted);
    white-space: pre-line;
}

.status-ok {
    background: var(--green-bg);
    border-color: var(--green-border);
}
.status-ok .status-title { color: var(--green-fg); }
.status-ok .status-detail { color: #bbf7d0; }

.status-err {
    background: var(--red-bg);
    border-color: var(--red-border);
}
.status-err .status-title { color: var(--red-fg); }
.status-err .status-detail { color: #fecaca; }

.status-warn {
    background: var(--warn-bg);
    border-color: var(--warn-border);
}
.status-warn .status-title { color: var(--warn-fg); }
.status-warn .status-detail { color: #fde68a; }

.progress-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.84rem;
    margin-bottom: 7px;
}

.progress-track {
    height: 10px;
    border-radius: 999px;
    background: var(--card-inner);
    border: 1px solid var(--border);
    overflow: hidden;
    margin-bottom: 12px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent), #f4a261);
    transition: width 0.08s linear;
}

.log-box {
    margin: 0 0 14px;
    height: 160px;
    overflow-y: auto;
    padding: 10px 12px;
    border-radius: 8px;
    background: var(--card-inner);
    border: 1px solid var(--border);
    color: var(--muted);
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.78rem;
    white-space: pre-wrap;
    word-break: break-word;
}

.footer-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.hint {
    font-size: 0.8rem;
    color: var(--dim);
}

.btn-group {
    display: flex;
    gap: 8px;
}

.btn {
    border-radius: 8px;
    padding: 9px 14px;
    font-size: 0.86rem;
    font-weight: 600;
    cursor: pointer;
    border: 1px solid var(--border);
    transition: background 0.12s ease, opacity 0.12s ease;
}

.btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.btn-secondary {
    background: #232836;
    color: #e2e8f0;
}
.btn-secondary:hover:not(:disabled) {
    background: #2d3447;
}

.btn-primary {
    background: var(--accent);
    border-color: #f87171;
    color: #fff;
    padding: 10px 18px;
}
.btn-primary:hover:not(:disabled) {
    background: var(--accent-hover);
}

@media (max-width: 680px) {
    .drop-zone {
        flex-direction: column;
        align-items: flex-start;
    }
}
