/*临时中转——极简界面，无外部依赖，跟随系统深色模式。 */
:root {
 --bg: #f4f5f7;
 --surface: #ffffff;
 --surface-2: #f7f8fa;
 --text: #14161a;
 --text-2: #5b6472;
 --text-3: #8b94a3;
 --line: #e4e7ec;
 --line-strong: #d3d8e0;
 --brand: #2f6df6;
 --brand-hover: #1f57d6;
 --brand-soft: #eaf0fe;
 --ok: #0f8a4d;
 --ok-soft: #e7f6ee;
 --warn: #a86400;
 --warn-soft: #fdf3e2;
 --danger: #d13b3b;
 --danger-soft: #fdeced;
 --r-sm:8px;
 --r-md:12px;
 --r-lg:16px;
 --shadow:0 1px 2px rgba(16,24,40,.04),0 8px 24px -12px rgba(16,24,40,.10);
 --shadow-lift:0 2px 6px rgba(16,24,40,.06),0 16px 40px -16px rgba(16,24,40,.16);
}

@media (prefers-color-scheme: dark) {
 :root {
 --bg: #0c0d10;
 --surface: #16181d;
 --surface-2: #1c1f26;
 --text: #eef0f4;
 --text-2: #a3abb9;
 --text-3: #767f8e;
 --line: #262a33;
 --line-strong: #333945;
 --brand: #4c82ff;
 --brand-hover: #6b97ff;
 --brand-soft: #16233d;
 --ok: #43c98a;
 --ok-soft: #15291f;
 --warn: #e0a23a;
 --warn-soft: #2c2314;
 --danger: #ef6b6b;
 --danger-soft: #2d1719;
 --shadow:0 1px 2px rgba(0,0,0,.4),0 8px 24px -12px rgba(0,0,0,.6);
 --shadow-lift:0 2px 6px rgba(0,0,0,.5),0 16px 40px -16px rgba(0,0,0,.7);
 }
}

* , *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust:100%; }

body {
 margin:0;
 background: var(--bg);
 color: var(--text);
 font:14px/1.6 -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
 "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
 -webkit-font-smoothing: antialiased;
}

.page {
 max-width:820px;
 margin:0 auto;
 padding:28px 20px 64px;
}

.page.center {
 max-width:560px;
 min-height:100vh;
 display:flex;
 align-items:center;
 justify-content:center;
 padding:32px 20px;
}

/* ----------顶栏 ---------- */
.topbar {
 display:flex;
 align-items:center;
 justify-content:space-between;
 gap:16px;
 margin-bottom:20px;
}

.brand {
 display:flex;
 align-items:center;
 gap:8px;
 min-width:0;
}

.brand-dot {
 width:9px;
 height:9px;
 border-radius:50%;
 background: var(--brand);
 box-shadow:0 0 0 3px var(--brand-soft);
 flex:none;
}

.brand-name {
 font-size:15px;
 font-weight:650;
 letter-spacing:.01em;
}

.brand-sub {
 font-size:12px;
 color: var(--text-3);
 padding-left:8px;
 border-left:1px solid var(--line);
 white-space:nowrap;
}

/* ----------面板 ---------- */
.panel {
 background: var(--surface);
 border:1px solid var(--line);
 border-radius: var(--r-lg);
 padding:20px;
 margin-bottom:14px;
 box-shadow: var(--shadow);
}

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

.panel-title {
 margin:0 0 14px;
 font-size:13px;
 font-weight:650;
 color: var(--text-2);
 letter-spacing:.02em;
}

.panel-head .panel-title { margin-bottom:0; }

/* ----------表单 ---------- */
.label {
 display:block;
 font-size:12.5px;
 font-weight:550;
 color: var(--text-2);
 margin-bottom:6px;
}

.field { margin-bottom:0; }

.help {
 margin:6px 0 0;
 font-size:12px;
 color: var(--text-3);
 line-height:1.45;
}

.help.error { color: var(--danger); }

.inline {
 display:flex;
 gap:8px;
 align-items:stretch;
}

.inline > input { flex:1 1 auto; min-width:0; }
.inline > .btn { flex:none; }

input[type="password"],
input[type="text"],
input[type="number"],
select {
 width:100%;
 height:38px;
 padding:0 11px;
 background: var(--surface-2);
 color: var(--text);
 border:1px solid var(--line-strong);
 border-radius: var(--r-sm);
 font:inherit;
 font-size:13.5px;
 outline:none;
 transition: border-color .15s, box-shadow .15s, background .15s;
}

input[type="number"] { -moz-appearance:textfield; }
input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button { -webkit-appearance:none; margin:0; }

select {
 appearance:none;
 padding-right:30px;
 background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='001212'%3E%3Cpath d='M34.5L68l3-3.5' fill='none' stroke='%238b94a3' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E");
 background-repeat:no-repeat;
 background-position:right 10px center;
}

input:focus,
select:focus {
 border-color: var(--brand);
 background: var(--surface);
 box-shadow:0 0 0 3px var(--brand-soft);
}

input.bad { border-color: var(--danger); }

.grid2 {
 display:grid;
 grid-template-columns:1fr 1fr;
 gap:14px;
 margin-bottom:14px;
}

/* ----------按钮 ---------- */
.btn {
 display:inline-flex;
 align-items:center;
 justify-content:center;
 gap:7px;
 height:38px;
 padding:0 15px;
 border:1px solid var(--line-strong);
 border-radius: var(--r-sm);
 background: var(--surface);
 color: var(--text);
 font:inherit;
 font-size:13.5px;
 font-weight:550;
 cursor:pointer;
 white-space:nowrap;
 transition: background .15s, border-color .15s, opacity .15s, transform .08s;
}

.btn:hover:not(:disabled) { background: var(--surface-2); border-color: var(--text-3); }
.btn:active:not(:disabled) { transform: translateY(1px); }
.btn:disabled { opacity:.5; cursor:not-allowed; }

.btn.primary {
 background: var(--brand);
 border-color: var(--brand);
 color:#fff;
}

.btn.primary:hover:not(:disabled) {
 background: var(--brand-hover);
 border-color: var(--brand-hover);
}

.btn.block { width:100%; }

.btn.big {
 height:46px;
 width:100%;
 font-size:15px;
 border-radius:10px;
}

.btn-icon {
 display:inline-flex;
 width:16px;
 height:16px;
}

.btn-icon svg { width:100%; height:100%; }

.ghost {
 height:30px;
 padding:0 10px;
 border:1px solid transparent;
 border-radius:7px;
 background:transparent;
 color: var(--text-3);
 font:inherit;
 font-size:12.5px;
 cursor:pointer;
 transition: background .15s, color .15s;
}

.ghost:hover { background: var(--surface-2); color: var(--text); }

/* ----------上传区 ---------- */
.drop {
 display:flex;
 flex-direction:column;
 align-items:center;
 justify-content:center;
 gap:6px;
 padding:26px 16px;
 margin-bottom:16px;
 border:1.5px dashed var(--line-strong);
 border-radius: var(--r-md);
 background: var(--surface-2);
 cursor:pointer;
 text-align:center;
 transition: border-color .15s, background .15s;
}

.drop:hover,
.drop.is-over {
 border-color: var(--brand);
 background: var(--brand-soft);
}

.drop input[type="file"] {
 position:absolute;
 width:1px;
 height:1px;
 padding:0;
 margin:-1px;
 overflow:hidden;
 clip:rect(0 0 0 0);
 border:0;
}

.drop-icon {
 width:30px;
 height:30px;
 color: var(--brand);
 opacity:.9;
}

.drop-icon svg { width:100%; height:100%; }

.drop-title {
 font-size:13.5px;
 font-weight:600;
 max-width:100%;
 overflow:hidden;
 text-overflow:ellipsis;
 white-space:nowrap;
}

.drop-sub {
 font-size:12px;
 color: var(--text-3);
}

.drop.has-file {
 border-style:solid;
 border-color: var(--brand);
 background: var(--brand-soft);
}

/* ----------进度 ---------- */
.prog-head {
 display:flex;
 align-items:baseline;
 justify-content:space-between;
 gap:12px;
 margin-bottom:9px;
 font-size:12.5px;
 color: var(--text-2);
}

.prog-pct {
 font-variant-numeric: tabular-nums;
 font-weight:650;
 color: var(--brand);
 font-size:13px;
}

.bar {
 height:6px;
 background: var(--line);
 border-radius:99px;
 overflow:hidden;
}

.bar > i {
 display:block;
 width:0;
 height:100%;
 background: var(--brand);
 border-radius:99px;
 transition: width .2s ease;
}

/* ----------结果 ---------- */
.result-file {
 margin:0 0 10px;
 font-size:13px;
 color: var(--text-2);
 word-break:break-all;
}

/* ----------列表 ---------- */
.table-wrap { overflow-x:auto; margin:0 -20px -20px; padding:0 20px; }

.grid {
 width:100%;
 border-collapse:collapse;
 font-size:13px;
 table-layout:fixed;
}

.grid col.c-file { width:auto; }
.grid col.c-size { width:78px; }
.grid col.c-dl { width:62px; }
.grid col.c-status { width:74px; }
.grid col.c-exp { width:82px; }
.grid col.c-ops { width:76px; }

.grid th {
 text-align:left;
 font-weight:550;
 font-size:11.5px;
 letter-spacing:.03em;
 text-transform:uppercase;
 color: var(--text-3);
 padding:8px 10px;
 border-bottom:1px solid var(--line);
 white-space:nowrap;
}

.grid td {
 padding:11px 10px;
 border-bottom:1px solid var(--line);
 vertical-align:middle;
}

.grid tbody tr:last-child td { border-bottom:none; }
.grid tbody tr:hover { background: var(--surface-2); }

.grid th.num,
.grid td.num { text-align:right; font-variant-numeric: tabular-nums; white-space:nowrap; }

.fname {
 max-width:100%;
 overflow:hidden;
 text-overflow:ellipsis;
 white-space:nowrap;
 font-weight:500;
}

.fsub {
 font-size:11.5px;
 color: var(--text-3);
 margin-top:1px;
 overflow:hidden;
 text-overflow:ellipsis;
 white-space:nowrap;
 max-width:100%;
}

.tag {
 display:inline-block;
 padding:2px 8px;
 border-radius:99px;
 font-size:11.5px;
 font-weight:550;
 white-space:nowrap;
}

.tag.ok { color: var(--ok); background: var(--ok-soft); }
.tag.wait { color: var(--warn); background: var(--warn-soft); }
.tag.warn { color: var(--danger); background: var(--danger-soft); }

.faded { color: var(--text-3); }

.ops {
 display:flex;
 gap:2px;
 justify-content:flex-end;
 align-items:center;
}

.ops .ghost {
 width:30px;
 height:30px;
 padding:0;
 display:inline-flex;
 align-items:center;
 justify-content:center;
}

.ops .ghost svg {
 width:15px;
 height:15px;
 display:block;
}

.ops .ghost { color: var(--text-2); }
.ops .ghost:hover { color: var(--text); }
.ops .ghost.danger:hover { color: var(--danger); background: var(--danger-soft); }

.empty {
 margin:6px 0 2px;
 font-size:13px;
 color: var(--text-3);
}

/* ----------分享页卡片 ---------- */
.card {
 width:100%;
 background: var(--surface);
 border:1px solid var(--line);
 border-radius:18px;
 padding:26px;
 box-shadow: var(--shadow-lift);
}

.file-head {
 display:flex;
 gap:13px;
 align-items:flex-start;
 margin-bottom:4px;
}

.badge {
 flex:none;
 margin-top:2px;
 padding:3px 7px;
 border-radius:6px;
 background: var(--brand-soft);
 color: var(--brand);
 font-size:10.5px;
 font-weight:700;
 letter-spacing:.06em;
 font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}

.file-title-wrap { min-width:0; flex:1 1 auto; }

.file-title {
 margin:0;
 font-size:16.5px;
 font-weight:650;
 line-height:1.4;
 word-break:break-all;
 letter-spacing:-.005em;
}

.file-meta {
 margin:5px 0 0;
 font-size:12.5px;
 color: var(--text-3);
 font-variant-numeric: tabular-nums;
}

.file-note {
 margin:16px 0 0;
 padding:11px 13px;
 background: var(--surface-2);
 border-radius:10px;
 font-size:13px;
 color: var(--text-2);
 white-space:pre-wrap;
 word-break:break-word;
}

.pw { margin-top:20px; }

.actions { margin-top:22px; }

.hint {
 margin:11px 0 0;
 font-size:12px;
 color: var(--text-3);
 text-align:center;
 min-height:1.2em;
}

.state {
 margin:8px 0 4px;
 text-align:center;
}

.state-title {
 margin:0 0 6px;
 font-size:15px;
 font-weight:650;
}

.state-desc {
 margin:0;
 font-size:13px;
 color: var(--text-3);
}

.foot {
 margin-top:22px;
 padding-top:16px;
 border-top:1px solid var(--line);
 font-size:11.5px;
 color: var(--text-3);
 text-align:center;
}

/* ----------杂项 ---------- */
.hidden { display:none !important; }

.alert {
 margin-top:12px;
 padding:10px 12px;
 border-radius: var(--r-sm);
 background: var(--danger-soft);
 color: var(--danger);
 font-size:12.5px;
}

@media (max-width:640px) {
 .page { padding:18px 14px 48px; }
 .panel { padding:16px; }
 .grid2 { grid-template-columns:1fr; gap:12px; }
 .table-wrap { margin:0 -16px -16px; padding:0 16px; }
 .fname, .fsub { max-width:180px; }
 .card { padding:20px; }
 .brand-sub { display:none; }
}
