:root {
    --bg0: #101814;
    --bg1: #17241c;
    --surface: rgba(220, 245, 230, 0.06);
    --line: rgba(160, 210, 175, 0.2);
    --text: #eef7f1;
    --muted: #9fb8a8;
    --accent: #3d9b6a;
    --accent-deep: #2a704c;
    --danger: #c45c5c;
    --radius: 18px;
    --control-bg: rgba(0, 0, 0, 0.28);
    --font: "Segoe UI", "Helvetica Neue", sans-serif;
}

* { box-sizing: border-box; }

html { color-scheme: dark; }

body {
    margin: 0;
    min-height: 100vh;
    font-family: var(--font);
    color: var(--text);
    background:
        radial-gradient(900px 500px at 10% -10%, rgba(61, 155, 106, 0.3), transparent 60%),
        radial-gradient(700px 420px at 100% 0%, rgba(30, 80, 50, 0.4), transparent 55%),
        linear-gradient(165deg, var(--bg1), var(--bg0) 55%, #0a100d);
}

.page {
    width: min(640px, calc(100% - 2rem));
    margin: 0 auto;
    padding: 2.5rem 0 3rem;
    display: grid;
    gap: 1.1rem;
}

.brand {
    display: flex;
    align-items: center;
    gap: 0.85rem;
}

.brand-home {
    display: inline-flex;
    border-radius: 50%;
    overflow: hidden;
    flex: 0 0 auto;
}

.brand-name {
    margin: 0;
    font-size: 0.78rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted);
}

.brand h1 {
    margin: 0.15rem 0 0;
    font-size: 1.55rem;
    font-weight: 650;
}

.lede {
    margin: 0;
    color: var(--muted);
    line-height: 1.45;
}

.hint {
    margin: 0;
    color: var(--muted);
    font-size: 0.88rem;
    line-height: 1.4;
}

.muted { color: var(--muted); }
.mb-0 { margin-bottom: 0; }

.alert {
    padding: 0.85rem 1rem;
    border-radius: 12px;
    border: 1px solid var(--line);
    background: var(--surface);
}

.alert.danger {
    border-color: rgba(196, 92, 92, 0.45);
    background: rgba(196, 92, 92, 0.15);
    color: #ffd0d0;
}

.alert.warning {
    border-color: rgba(210, 170, 80, 0.45);
    background: rgba(210, 170, 80, 0.12);
    color: #ffe7a8;
}

.drop-zone {
    border: 2px dashed var(--line);
    border-radius: var(--radius);
    background: var(--surface);
    padding: 2.4rem 1.25rem;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.15s ease, background 0.15s ease;
}

.drop-zone:hover,
.drop-zone.dragover {
    border-color: var(--accent);
    background: rgba(61, 155, 106, 0.12);
}

.drop-zone h2 {
    margin: 0 0 0.35rem;
    font-size: 1.15rem;
    font-weight: 650;
}

.drop-icon {
    font-size: 2rem;
    line-height: 1;
    margin-bottom: 0.5rem;
}

.panel {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
    overflow: hidden;
}

.panel-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--line);
    font-weight: 600;
}

.file-list {
    padding: 0.85rem 1rem;
    max-height: 320px;
    overflow-y: auto;
}

.file-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
    padding: 0.7rem 0.75rem;
    border: 1px solid var(--line);
    border-radius: 12px;
    margin-bottom: 0.5rem;
    background: var(--control-bg);
}

.file-row:last-child { margin-bottom: 0; }

.file-row[draggable="true"] { cursor: grab; }
.file-row.dragging { opacity: 0.45; }
.file-row.drop-target {
    border-color: var(--accent);
    box-shadow: inset 0 2px 0 var(--accent);
}

.file-meta {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    min-width: 0;
}

.file-meta strong {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.drag-handle {
    color: var(--muted);
    user-select: none;
}

.btn {
    appearance: none;
    border: 0;
    border-radius: 999px;
    padding: 0.7rem 1.15rem;
    font: inherit;
    font-weight: 600;
    color: #fff;
    background: linear-gradient(180deg, var(--accent), var(--accent-deep));
    cursor: pointer;
}

.btn:disabled { opacity: 0.55; cursor: wait; }

.btn.secondary,
.btn.ghost {
    background: transparent;
    border: 1px solid var(--line);
    color: var(--text);
}

.btn.ghost {
    padding: 0.35rem 0.7rem;
    font-size: 0.85rem;
}

.btn.danger-outline {
    background: transparent;
    border: 1px solid rgba(196, 92, 92, 0.55);
    color: #ffd0d0;
    padding: 0.35rem 0.7rem;
    font-size: 0.85rem;
    border-radius: 999px;
}

.foot {
    margin-top: 0.5rem;
}

.foot a {
    color: var(--muted);
    text-decoration: none;
}

.foot a:hover { color: var(--text); }
