/* ==========================================================================
   起弧应用 · ARC App Library
   深色工业风：电光青 + 焊花橙
   ========================================================================== */

:root {
  --bg: #080a0e;
  --bg-2: #0b0e13;
  --panel: #111620;
  --panel-2: #161c27;
  --panel-3: #1b2230;
  --line: #212835;
  --line-2: #2c3444;
  --text: #e9eef7;
  --text-2: #9fadc0;
  --muted: #75839a;
  --arc: #4cc9ff;
  --arc-2: #8a6cff;
  --spark: #ff9a3c;
  --ok: #3ddc97;
  --danger: #ff6172;
  --radius: 16px;
  --shadow: 0 24px 60px -20px rgba(0, 0, 0, 0.75);
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Microsoft YaHei", "Hiragino Sans GB", sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

html, body { height: 100%; }

body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

button, input, select, textarea { font-family: inherit; font-size: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; }
a { color: inherit; text-decoration: none; }
::selection { background: rgba(76, 201, 255, 0.28); }

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.ic {
  width: 16px; height: 16px; flex: 0 0 auto;
  fill: none; stroke: currentColor; stroke-width: 1.7;
  stroke-linecap: round; stroke-linejoin: round;
}

/* ---------- 背景 ---------- */
.bg { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.glow { position: absolute; border-radius: 50%; filter: blur(90px); opacity: 0.5; }
.g1 { width: 620px; height: 620px; left: -220px; top: -280px; background: radial-gradient(circle, rgba(76, 201, 255, 0.3), transparent 70%); }
.g2 { width: 700px; height: 700px; right: -300px; top: 120px; background: radial-gradient(circle, rgba(138, 108, 255, 0.22), transparent 70%); }
.g3 { width: 520px; height: 520px; left: 30%; bottom: -320px; background: radial-gradient(circle, rgba(255, 154, 60, 0.12), transparent 70%); }
.mesh {
  position: absolute; inset: 0; opacity: 0.5;
  background-image:
    linear-gradient(to right, rgba(255, 255, 255, 0.028) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.028) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 90% 70% at 50% 0%, #000 20%, transparent 78%);
  -webkit-mask-image: radial-gradient(ellipse 90% 70% at 50% 0%, #000 20%, transparent 78%);
}

/* ---------- 顶栏 ---------- */
.topbar {
  position: sticky; top: 0; z-index: 40;
  display: flex; align-items: center; gap: 20px;
  height: 66px; padding: 0 24px;
  background: rgba(9, 11, 16, 0.78);
  backdrop-filter: blur(18px) saturate(140%);
  border-bottom: 1px solid var(--line);
}

.brand { display: flex; align-items: center; gap: 11px; flex: 0 0 auto; }
.brand-mark {
  width: 38px; height: 38px; border-radius: 11px;
  display: grid; place-items: center;
  background: linear-gradient(150deg, #131a26, #0d1218);
  border: 1px solid rgba(76, 201, 255, 0.24);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.4), 0 6px 18px -8px rgba(76, 201, 255, 0.55),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
  transition: box-shadow 0.3s, transform 0.3s;
}
.brand:hover .brand-mark { transform: translateY(-1px); box-shadow: 0 0 22px -4px rgba(76, 201, 255, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.08); }
.brand-mark svg { width: 26px; height: 26px; }
.brand-txt { display: flex; flex-direction: column; line-height: 1.2; }
.brand-txt b { font-size: 15.5px; letter-spacing: 1.2px; font-weight: 700; }
.brand-txt i {
  font-style: normal; font-size: 9.5px; letter-spacing: 1.9px;
  color: var(--muted); margin-top: 3px; text-transform: uppercase;
}

.search {
  position: relative; flex: 1 1 auto; max-width: 520px; margin-left: 8px;
  display: flex; align-items: center;
}
.search .ic { position: absolute; left: 13px; color: var(--muted); pointer-events: none; }
.search input {
  width: 100%; height: 38px; padding: 0 62px 0 38px;
  background: rgba(20, 26, 36, 0.85);
  border: 1px solid var(--line);
  border-radius: 11px; outline: none;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}
.search input::placeholder { color: var(--muted); }
.search input:focus {
  border-color: rgba(76, 201, 255, 0.55);
  background: rgba(23, 30, 41, 0.95);
  box-shadow: 0 0 0 3px rgba(76, 201, 255, 0.1);
}
.search input::-webkit-search-cancel-button { -webkit-appearance: none; }
.search kbd {
  position: absolute; right: 10px;
  font-family: var(--font); font-size: 10px; letter-spacing: 0.4px;
  color: var(--muted); padding: 3px 6px; border-radius: 5px;
  border: 1px solid var(--line); background: rgba(255, 255, 255, 0.03);
}

.top-actions { display: flex; align-items: center; gap: 9px; margin-left: auto; }

.seg { display: flex; padding: 3px; gap: 2px; background: rgba(20, 26, 36, 0.85); border: 1px solid var(--line); border-radius: 10px; }
.seg button {
  width: 30px; height: 28px; border-radius: 7px;
  display: grid; place-items: center; color: var(--muted);
  transition: background 0.18s, color 0.18s;
}
.seg button:hover { color: var(--text-2); }
.seg button.on { background: var(--panel-3); color: var(--arc); box-shadow: inset 0 0 0 1px rgba(76, 201, 255, 0.25); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  height: 36px; padding: 0 15px; border-radius: 10px;
  border: 1px solid transparent; font-size: 13px; font-weight: 500;
  color: var(--text-2); transition: all 0.18s; white-space: nowrap;
}
.btn:hover { color: var(--text); }
.btn.primary {
  background: linear-gradient(135deg, #63d8ff, #4cc9ff 40%, #8a6cff);
  color: #04121a; font-weight: 700;
  box-shadow: 0 8px 24px -12px rgba(76, 201, 255, 0.85), inset 0 1px 0 rgba(255, 255, 255, 0.4);
}
.btn.primary:hover { filter: brightness(1.08); transform: translateY(-1px); }
.btn.primary:active { transform: translateY(0); }
.btn.primary .ic { stroke-width: 2.1; }
.btn.ghost { border-color: var(--line); background: rgba(22, 28, 39, 0.7); }
.btn.ghost:hover { border-color: var(--line-2); background: var(--panel-2); }
.btn.icon-only { width: 36px; padding: 0; }
.btn.sm { height: 28px; padding: 0 10px; font-size: 12px; border-radius: 8px; }
.btn.sm:hover { color: var(--text); }
.btn:disabled { opacity: 0.5; pointer-events: none; }

/* ---------- 布局 ---------- */
.layout {
  position: relative; z-index: 1;
  display: grid; grid-template-columns: 236px minmax(0, 1fr);
  gap: 28px; max-width: 1560px; margin: 0 auto;
  padding: 26px 24px 60px;
  align-items: start;
}
.sidebar, .content { min-width: 0; }

/* ---------- 侧栏 ---------- */
.sidebar {
  position: sticky; top: 92px;
  display: flex; flex-direction: column;
  max-height: calc(100vh - 116px);
  gap: 14px;
}
.side-scroll { overflow-y: auto; min-height: 0; padding-right: 4px; }
.side-label {
  font-size: 10px; letter-spacing: 2px; text-transform: uppercase;
  color: var(--muted); padding: 2px 12px 10px;
}
.cats { display: flex; flex-direction: column; gap: 2px; }
.cat {
  display: flex; align-items: center; gap: 9px;
  width: 100%; padding: 9px 12px; border-radius: 9px;
  color: var(--text-2); text-align: left; font-size: 13px;
  transition: background 0.16s, color 0.16s;
  position: relative;
}
.cat:hover { background: rgba(255, 255, 255, 0.035); color: var(--text); }
.cat.on { background: linear-gradient(90deg, rgba(76, 201, 255, 0.14), rgba(76, 201, 255, 0.03)); color: var(--text); }
.cat.on::before {
  content: ""; position: absolute; left: 0; top: 50%; transform: translateY(-50%);
  width: 2px; height: 16px; border-radius: 2px;
  background: linear-gradient(180deg, var(--arc), var(--arc-2));
}
.cat .dot { width: 6px; height: 6px; border-radius: 2px; background: var(--line-2); flex: 0 0 auto; }
.cat.on .dot { background: var(--arc); box-shadow: 0 0 8px var(--arc); }
.cat .nm { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cat .ct { font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; }
.cat .ic { width: 14px; height: 14px; }

.side-tip {
  margin: 16px 4px 0; padding: 12px 13px;
  border: 1px dashed var(--line-2); border-radius: 11px;
  display: flex; flex-direction: column; gap: 4px;
}
.side-tip b { font-size: 11.5px; color: var(--text-2); }
.side-tip span { font-size: 11px; color: var(--muted); line-height: 1.6; }

.storage {
  flex: 0 0 auto; padding: 12px 13px;
  background: rgba(17, 22, 32, 0.7);
  border: 1px solid var(--line); border-radius: 12px;
}
.storage-head { display: flex; justify-content: space-between; font-size: 11px; color: var(--muted); margin-bottom: 8px; }
.storage-head b { color: var(--text-2); font-variant-numeric: tabular-nums; }
.bar { height: 4px; border-radius: 4px; background: rgba(255, 255, 255, 0.06); overflow: hidden; }
.bar i {
  display: block; height: 100%; border-radius: 4px;
  background: linear-gradient(90deg, var(--arc), var(--arc-2));
  transition: width 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.storage-foot { margin-top: 8px; font-size: 10.5px; color: var(--muted); }

/* ---------- 内容区 ---------- */
.content { min-width: 0; }
.content-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 16px; margin-bottom: 18px; padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}
.ch-title h1 { margin: 0; font-size: 21px; font-weight: 700; letter-spacing: 0.3px; }
.ch-title p { margin: 4px 0 0; font-size: 12px; color: var(--muted); }
.sortwrap { display: flex; align-items: center; gap: 8px; }
.sortwrap label { font-size: 11px; color: var(--muted); }
.sortwrap select {
  height: 32px; padding: 0 28px 0 10px; border-radius: 8px; outline: none;
  background: var(--panel) url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236b798d' stroke-width='2' stroke-linecap='round'><path d='m6 9 6 6 6-6'/></svg>") no-repeat right 8px center;
  background-size: 14px;
  border: 1px solid var(--line); color: var(--text-2);
  appearance: none; cursor: pointer;
}
.sortwrap select:focus { border-color: rgba(76, 201, 255, 0.5); }

/* ---------- 卡片网格 ---------- */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(228px, 1fr));
  gap: 14px;
}

.card {
  position: relative; display: flex; flex-direction: column;
  padding: 15px 15px 12px;
  background:
    radial-gradient(120% 90% at 0% 0%, rgba(76, 201, 255, 0.055), transparent 60%),
    linear-gradient(180deg, #141a24, #10151d);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.22s cubic-bezier(0.2, 0.8, 0.2, 1), border-color 0.22s, box-shadow 0.22s;
  animation: cardIn 0.42s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}
@keyframes cardIn {
  from { opacity: 0; transform: translateY(10px) scale(0.985); }
  to { opacity: 1; transform: none; }
}
.card::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  opacity: 0; transition: opacity 0.25s;
  background: radial-gradient(80% 60% at 50% 0%, rgba(76, 201, 255, 0.12), transparent 70%);
}
.card:hover { transform: translateY(-3px); border-color: rgba(76, 201, 255, 0.32); box-shadow: var(--shadow); }
.card:hover::after { opacity: 1; }

.fav {
  position: absolute; top: 10px; right: 10px; z-index: 2;
  width: 26px; height: 26px; border-radius: 8px;
  display: grid; place-items: center; color: var(--muted);
  opacity: 0; transition: opacity 0.18s, color 0.18s, background 0.18s;
}
.card:hover .fav { opacity: 1; }
.fav:hover { background: rgba(255, 255, 255, 0.06); color: var(--spark); }
.fav.on { opacity: 1; color: var(--spark); }
.fav.on .ic { fill: rgba(255, 154, 60, 0.18); }

.c-head { display: flex; gap: 12px; align-items: flex-start; padding-right: 22px; }
.app-icon {
  width: 46px; height: 46px; border-radius: 12px; flex: 0 0 auto;
  object-fit: cover; background: var(--panel-3);
  border: 1px solid rgba(255, 255, 255, 0.07);
  box-shadow: 0 6px 16px -10px rgba(0, 0, 0, 0.9);
}
.app-icon.gen {
  display: grid; place-items: center;
  background: linear-gradient(150deg, hsl(var(--h) 70% 46%), hsl(calc(var(--h) + 34) 74% 34%));
  font-size: 19px; font-weight: 700; color: #fff; letter-spacing: 0.5px;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
}
.c-title { min-width: 0; padding-top: 1px; }
.c-name {
  margin: 0; font-size: 14.5px; font-weight: 650; letter-spacing: 0.2px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.c-desc {
  margin: 5px 0 0; font-size: 11.5px; line-height: 1.55; color: var(--muted);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden; min-height: 36px;
}
.chips { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 12px; }
.chip {
  font-size: 10.5px; padding: 2.5px 7px; border-radius: 5px;
  background: rgba(255, 255, 255, 0.045); color: var(--text-2);
  border: 1px solid rgba(255, 255, 255, 0.045);
  max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.chip.cat { color: #8dd9f5; background: rgba(76, 201, 255, 0.09); border-color: rgba(76, 201, 255, 0.16); }
.chip.linkkind { color: #b4a4ff; background: rgba(138, 108, 255, 0.1); border-color: rgba(138, 108, 255, 0.18); }

.c-foot {
  display: flex; align-items: center; justify-content: space-between;
  gap: 8px; margin-top: auto; padding-top: 11px;
  border-top: 1px solid rgba(255, 255, 255, 0.045);
}
.c-size { font-size: 10.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.c-acts { display: flex; gap: 2px; opacity: 0; transition: opacity 0.18s; }
.card:hover .c-acts, .card:focus-within .c-acts { opacity: 1; }
.c-acts button {
  width: 26px; height: 26px; border-radius: 7px; display: grid; place-items: center;
  color: var(--muted); transition: background 0.16s, color 0.16s;
}
.c-acts button:hover { background: rgba(255, 255, 255, 0.07); color: var(--arc); }
.c-acts button[data-act="del"]:hover { color: var(--danger); }

/* 列表视图 */
.grid.list { grid-template-columns: 1fr; gap: 8px; }
.grid.list .card {
  flex-direction: row; align-items: center; gap: 14px;
  padding: 11px 14px; border-radius: 12px;
}
.grid.list .c-head { flex: 1 1 auto; align-items: center; padding-right: 0; gap: 12px; }
.grid.list .app-icon { width: 38px; height: 38px; border-radius: 10px; font-size: 16px; }
.grid.list .c-desc { display: none; }
.grid.list .c-title { flex: 1; min-width: 0; }
.grid.list .chips { margin: 0; flex: 0 0 auto; }
.grid.list .c-foot { border: 0; padding: 0; margin: 0; flex: 0 0 auto; }
.grid.list .c-size { display: none; }
.grid.list .c-acts { opacity: 1; }
.grid.list .fav { position: static; opacity: 1; order: 3; }

/* ---------- 空状态 ---------- */
.empty {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 12px; padding: 64px 24px; margin-top: 8px;
  border: 1px dashed var(--line-2); border-radius: 18px;
  background: radial-gradient(70% 70% at 50% 0%, rgba(76, 201, 255, 0.05), transparent 70%);
  text-align: center;
}
.empty-art svg { width: 132px; height: 88px; filter: drop-shadow(0 0 18px rgba(76, 201, 255, 0.25)); }
.empty h2 { margin: 4px 0 0; font-size: 17px; font-weight: 650; }
.empty p { margin: 0 0 8px; font-size: 12.5px; color: var(--muted); max-width: 380px; }

/* ---------- 弹窗 ---------- */
.modal { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 24px; }
.modal[hidden] { display: none; }
.modal-mask { position: absolute; inset: 0; background: rgba(4, 6, 10, 0.72); backdrop-filter: blur(6px); animation: fade 0.2s both; }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.modal-card {
  position: relative; width: min(600px, 100%); max-height: calc(100vh - 48px);
  display: flex; flex-direction: column;
  background: linear-gradient(180deg, #151b25, #0f141c);
  border: 1px solid var(--line-2); border-radius: 18px;
  box-shadow: 0 40px 100px -30px rgba(0, 0, 0, 0.9), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  animation: modalIn 0.26s cubic-bezier(0.2, 0.8, 0.2, 1) both;
  overflow: hidden;
}
@keyframes modalIn { from { opacity: 0; transform: translateY(14px) scale(0.98); } to { opacity: 1; transform: none; } }
.modal-head {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 16px;
  padding: 18px 20px 14px; border-bottom: 1px solid var(--line);
}
.modal-head h2 { margin: 0; font-size: 16px; font-weight: 650; }
.modal-head p { margin: 3px 0 0; font-size: 11.5px; color: var(--muted); }
.modal-body { padding: 16px 20px; overflow-y: auto; }
.modal-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 14px 20px; border-top: 1px solid var(--line); background: rgba(9, 12, 17, 0.5);
}
.foot-hint { font-size: 10.5px; color: var(--muted); }
.foot-actions { display: flex; gap: 9px; }

.mode-tabs { display: flex; gap: 4px; padding: 3px; background: rgba(8, 11, 16, 0.6); border: 1px solid var(--line); border-radius: 10px; margin-bottom: 14px; }
.mode-tabs button {
  flex: 1; display: flex; align-items: center; justify-content: center; gap: 6px;
  height: 32px; border-radius: 8px; font-size: 12.5px; color: var(--muted);
  transition: all 0.18s;
}
.mode-tabs button:hover { color: var(--text-2); }
.mode-tabs button.on { background: var(--panel-3); color: var(--text); box-shadow: inset 0 0 0 1px rgba(76, 201, 255, 0.22); }

.drop {
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 6px; padding: 24px 16px; border-radius: 13px;
  border: 1.5px dashed var(--line-2); background: rgba(9, 12, 17, 0.45);
  cursor: pointer; transition: all 0.2s; text-align: center;
}
.drop:hover { border-color: rgba(76, 201, 255, 0.4); background: rgba(76, 201, 255, 0.04); }
.drop.over { border-color: var(--arc); background: rgba(76, 201, 255, 0.09); box-shadow: inset 0 0 30px -10px rgba(76, 201, 255, 0.5); }
.drop-icon {
  width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center;
  background: rgba(76, 201, 255, 0.09); color: var(--arc); margin-bottom: 2px;
}
.drop-icon .ic { width: 20px; height: 20px; }
.drop b { font-size: 13px; font-weight: 550; }
.drop span { font-size: 11px; color: var(--muted); }

.picked {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px;
  border: 1px solid rgba(76, 201, 255, 0.25); border-radius: 11px;
  background: rgba(76, 201, 255, 0.06); color: var(--arc); margin-bottom: 4px;
}
.picked-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.picked-txt b { font-size: 12.5px; color: var(--text); font-weight: 550; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.picked-txt span { font-size: 10.5px; color: var(--muted); }

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 11px 12px; margin-top: 14px; }
.form-grid label { display: flex; flex-direction: column; gap: 5px; font-size: 11px; color: var(--muted); }
.form-grid label.full { grid-column: 1 / -1; }
.form-grid label.half { grid-column: span 1; }
.form-grid input, .form-grid textarea {
  width: 100%; padding: 8px 10px; border-radius: 9px; outline: none;
  background: rgba(8, 11, 16, 0.7); border: 1px solid var(--line);
  font-size: 12.5px; color: var(--text); transition: border-color 0.18s, box-shadow 0.18s;
}
.form-grid textarea { resize: vertical; min-height: 54px; line-height: 1.55; }
.form-grid input::placeholder, .form-grid textarea::placeholder { color: #566274; }
.form-grid input:focus, .form-grid textarea:focus { border-color: rgba(76, 201, 255, 0.55); box-shadow: 0 0 0 3px rgba(76, 201, 255, 0.09); }

.icon-row { display: flex; align-items: center; gap: 12px; margin-top: 14px; }
.icon-prev {
  width: 48px; height: 48px; border-radius: 12px; flex: 0 0 auto;
  display: grid; place-items: center; overflow: hidden;
  background: var(--panel-3); border: 1px solid var(--line-2);
  font-size: 18px; font-weight: 700; color: #fff;
}
.icon-prev img { width: 100%; height: 100%; object-fit: cover; }
.icon-actions { display: flex; flex-direction: column; gap: 5px; }
.icon-btns { display: flex; gap: 6px; }
.hint { font-size: 10.5px; color: var(--muted); }

.progress { display: flex; align-items: center; gap: 10px; margin-top: 14px; }
.progress-bar { flex: 1; height: 6px; border-radius: 6px; background: rgba(255, 255, 255, 0.07); overflow: hidden; }
.progress-bar i {
  display: block; height: 100%; width: 0%;
  background: linear-gradient(90deg, var(--arc), var(--arc-2));
  transition: width 0.25s;
}
.progress span { font-size: 11px; color: var(--text-2); font-variant-numeric: tabular-nums; min-width: 34px; text-align: right; }

/* ---------- 拖拽遮罩 ---------- */
.drag-veil {
  position: fixed; inset: 0; z-index: 200; display: none;
  place-items: center; background: rgba(6, 9, 14, 0.82); backdrop-filter: blur(8px);
}
.drag-veil.on { display: grid; }
.drag-veil-inner {
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  padding: 44px 64px; border-radius: 20px;
  border: 1.5px dashed rgba(76, 201, 255, 0.55);
  background: rgba(76, 201, 255, 0.05);
  box-shadow: 0 0 80px -20px rgba(76, 201, 255, 0.5);
  animation: veilPulse 1.6s ease-in-out infinite;
}
@keyframes veilPulse {
  0%, 100% { box-shadow: 0 0 60px -24px rgba(76, 201, 255, 0.45); }
  50% { box-shadow: 0 0 90px -16px rgba(76, 201, 255, 0.7); }
}
.drag-veil-inner .ic { width: 30px; height: 30px; color: var(--arc); stroke-width: 1.5; }
.drag-veil-inner b { font-size: 16px; letter-spacing: 0.6px; }
.drag-veil-inner span { font-size: 12px; color: var(--muted); }

/* ---------- 提示条 ---------- */
.toasts {
  position: fixed; right: 22px; bottom: 22px; z-index: 300;
  display: flex; flex-direction: column; gap: 8px; align-items: flex-end;
  pointer-events: none;
}
.toast {
  display: flex; align-items: center; gap: 9px;
  padding: 10px 14px; border-radius: 10px;
  background: rgba(22, 28, 39, 0.96); border: 1px solid var(--line-2);
  border-left: 3px solid var(--arc);
  box-shadow: 0 16px 40px -18px rgba(0, 0, 0, 0.9);
  font-size: 12.5px; color: var(--text);
  animation: toastIn 0.26s cubic-bezier(0.2, 0.8, 0.2, 1) both;
  max-width: 380px;
}
@keyframes toastIn { from { opacity: 0; transform: translateX(20px); } to { opacity: 1; transform: none; } }
.toast.out { animation: toastOut 0.22s both; }
@keyframes toastOut { to { opacity: 0; transform: translateX(16px); } }
.toast.ok { border-left-color: var(--ok); }
.toast.err { border-left-color: var(--danger); }
.toast .ic { color: var(--text-2); }

/* ---------- 滚动条 ---------- */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #232b39; border-radius: 10px; border: 3px solid transparent; background-clip: content-box; }
::-webkit-scrollbar-thumb:hover { background: #313b4d; background-clip: content-box; }

/* ---------- 响应式 ---------- */
@media (max-width: 1080px) {
  .layout { grid-template-columns: 200px minmax(0, 1fr); gap: 22px; }
  .search { max-width: none; }
}

@media (max-width: 880px) {
  .topbar { flex-wrap: wrap; height: auto; padding: 12px 16px; gap: 12px; }
  .search { order: 3; flex: 1 1 100%; margin-left: 0; }
  .search kbd { display: none; }
  .top-actions { margin-left: auto; }
  .layout { grid-template-columns: minmax(0, 1fr); gap: 18px; padding: 16px 16px 48px; }
  .sidebar { position: static; max-height: none; }
  .side-scroll { display: flex; flex-direction: column; gap: 8px; }
  .side-label, .side-tip { display: none; }
  .cats { flex-direction: row; overflow-x: auto; gap: 6px; padding-bottom: 4px; min-width: 0; scrollbar-width: none; }
  .cats::-webkit-scrollbar { display: none; }
  .cat { flex: 0 0 auto; width: auto; padding: 7px 13px; border: 1px solid var(--line); border-radius: 999px; }
  .cat .dot { display: none; }
  .cat.on::before { display: none; }
  .cat.on { border-color: rgba(76, 201, 255, 0.4); background: rgba(76, 201, 255, 0.1); }
  .storage { display: none; }
  .content-head { flex-wrap: wrap; gap: 10px; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
  .card { padding: 13px; }
  .c-desc { min-height: 0; -webkit-line-clamp: 2; }
  .c-acts { opacity: 1; }
  .c-foot { flex-wrap: wrap; gap: 6px; }
  .c-size { white-space: nowrap; font-size: 10px; }
  .form-grid { grid-template-columns: 1fr; }
  .form-grid label.half { grid-column: 1 / -1; }
  .modal { padding: 12px; }
  .modal-foot { flex-direction: column-reverse; align-items: stretch; }
  .foot-hint { display: none; }
  .foot-actions { justify-content: flex-end; }
  .grid.list .card { flex-wrap: wrap; }
  .grid.list .chips { display: none; }
}

/* 窄屏顶栏收紧 */
@media (max-width: 620px) {
  .topbar { padding: 10px 14px; gap: 10px; }
  .brand-txt i { display: none; }
  .brand-mark { width: 34px; height: 34px; border-radius: 10px; }
  .brand-mark svg { width: 23px; height: 23px; }
  #btnUpload { width: 36px; padding: 0; }
  #btnUpload span { display: none; }
  #btnRefresh { display: none; }
  .sortwrap label { display: none; }
  .content-head { align-items: center; }
  .ch-title h1 { font-size: 18px; }
}

/* ---------- 管理登录 ---------- */
.admin-card { width: min(400px, 94vw); }

.admin-field {
  display: flex; flex-direction: column; gap: 6px;
  font-size: 11px; color: var(--muted);
}
.admin-field input {
  width: 100%; padding: 10px 12px; border-radius: 9px; outline: none;
  background: rgba(8, 11, 16, 0.7); border: 1px solid var(--line);
  font-size: 13px; color: var(--text); letter-spacing: 1px;
  transition: border-color 0.18s, box-shadow 0.18s;
}
.admin-field input:focus { border-color: rgba(76, 201, 255, 0.55); box-shadow: 0 0 0 3px rgba(76, 201, 255, 0.09); }
.admin-field input::placeholder { color: #566274; letter-spacing: 0; }

.admin-err {
  margin: 10px 0 0; font-size: 12px; color: #ff7a7a;
  padding: 7px 10px; border-radius: 8px;
  background: rgba(255, 90, 90, 0.09); border: 1px solid rgba(255, 90, 90, 0.22);
}
.admin-hint { margin: 12px 0 0; font-size: 11px; color: var(--muted); line-height: 1.6; }

#btnAdmin.admin-on {
  color: #4cc9ff; border-color: rgba(76, 201, 255, 0.42);
  background: rgba(76, 201, 255, 0.08);
}

/* 访客身份提示条 */
.guest-note {
  display: flex; align-items: center; gap: 7px;
  margin: 0 0 10px; padding: 8px 11px; border-radius: 9px;
  font-size: 11.5px; color: var(--muted);
  background: rgba(255, 255, 255, 0.025); border: 1px solid var(--line);
}
.guest-note svg { width: 13px; height: 13px; flex: 0 0 auto; opacity: .75; }
.guest-note b { color: #9fb0c7; font-weight: 600; }

/* ---------- 微信登录 ---------- */
.wechat-btn {
  width: 100%; justify-content: center; gap: 8px;
  background: #07c160; border-color: #07c160; color: #fff;
  font-weight: 600; padding: 11px 14px; font-size: 13px;
}
.wechat-btn:hover { background: #06ad56; border-color: #06ad56; }
.wechat-btn:disabled { opacity: .6; cursor: default; }
.wechat-btn .ic { width: 17px; height: 17px; }

.admin-divider {
  display: flex; align-items: center; gap: 10px;
  margin: 14px 0 12px; color: var(--muted); font-size: 10.5px;
}
.admin-divider::before, .admin-divider::after {
  content: ''; flex: 1; height: 1px; background: var(--line);
}

.wechat-note {
  margin: 10px 0 0; font-size: 11.5px; line-height: 1.6; color: var(--muted);
  padding: 8px 10px; border-radius: 8px; background: rgba(255, 255, 255, 0.03);
}
.wechat-note.info { color: #8fd0ff; background: rgba(76, 201, 255, 0.08); border: 1px solid rgba(76, 201, 255, 0.18); }
.wechat-note.err { color: #ff8a8a; background: rgba(255, 90, 90, 0.08); border: 1px solid rgba(255, 90, 90, 0.2); }

/* ---- 下载统计 ---- */
.stats-card { width: min(760px, 96vw); }
.stats-sec { margin-bottom: 22px; }
.stats-sec:last-child { margin-bottom: 4px; }
.stats-sec h3 {
  margin: 0 0 10px; font-size: 12.5px; font-weight: 600; letter-spacing: .02em;
  color: var(--text); display: flex; align-items: center; gap: 8px;
}
.stats-sec h3 em { font-style: normal; font-size: 11px; color: var(--muted); font-weight: 400; }
.stats-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.stats-table th {
  text-align: left; font-weight: 500; color: var(--muted); font-size: 11px;
  padding: 6px 8px; border-bottom: 1px solid var(--line); white-space: nowrap;
}
.stats-table td { padding: 7px 8px; border-bottom: 1px solid rgba(255,255,255,.04); color: var(--text); }
.stats-table tr:last-child td { border-bottom: none; }
.stats-table td.num { font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
.stats-table td.dim { color: var(--muted); font-size: 11.5px; }
.stats-empty { margin: 4px 0 0; font-size: 12px; color: var(--muted); }
.stats-recent { max-height: 260px; overflow: auto; border: 1px solid var(--line); border-radius: 10px; }

/* ---- 右上角用户身份（昵称 + 短ID） ---- */
.btn.user-chip {
  gap: 7px; height: 36px; padding: 0 11px 0 9px;
  border-color: var(--line); background: rgba(22, 28, 39, 0.72);
  max-width: 240px;
}
.btn.user-chip:hover { border-color: var(--line-2); background: var(--panel-2); }
.btn.user-chip .ic { width: 15px; height: 15px; stroke: var(--arc); opacity: 0.9; }
.btn.user-chip > span {
  font-size: 12.5px; font-weight: 600; color: var(--text);
  max-width: 90px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.btn.user-chip > code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 11px; letter-spacing: 0.05em;
  padding: 2px 6px; border-radius: 6px;
  background: rgba(76, 201, 255, 0.12);
  border: 1px solid rgba(76, 201, 255, 0.22);
  color: var(--arc);
}
@media (max-width: 720px) {
  .btn.user-chip > span { display: none; }
}
.btn.user-chip.is-guest { border-style: dashed; }
.btn.user-chip.is-guest .ic { stroke: var(--muted); }
.btn.user-chip.is-guest > span { color: var(--muted); font-weight: 500; }

/* ---- 登录 / 注册 / 我的账号 ---- */
.modal-sub { margin: 4px 0 0; font-size: 12px; color: var(--muted); line-height: 1.5; }
.auth-tabs {
  display: flex; gap: 6px; padding: 4px;
  background: rgba(10, 14, 20, 0.6); border: 1px solid var(--line);
  border-radius: 10px; margin-bottom: 14px;
}
.auth-tab {
  flex: 1; height: 32px; border: 0; border-radius: 8px; cursor: pointer;
  background: transparent; color: var(--text-2); font: inherit; font-size: 13px; font-weight: 600;
  transition: background 0.15s, color 0.15s;
}
.auth-tab:hover { color: var(--text); }
.auth-tab.is-active { background: var(--panel-3); color: var(--text); box-shadow: inset 0 0 0 1px var(--line-2); }
.acct-row {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding: 9px 0; border-bottom: 1px dashed var(--line);
}
.acct-row:last-of-type { border-bottom: 0; }
.acct-row > span { font-size: 12.5px; color: var(--muted); flex: none; }
.acct-row > b { font-size: 13px; color: var(--text); font-weight: 600; text-align: right; }
.acct-uid {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px; color: var(--arc); word-break: break-all; text-align: right;
  padding: 3px 8px; border-radius: 7px;
  background: rgba(76, 201, 255, 0.1); border: 1px solid rgba(76, 201, 255, 0.2);
}
.wechat-note.ok { color: #7ee0a8; background: rgba(60, 200, 130, 0.08); border: 1px solid rgba(60, 200, 130, 0.2); }
.uid-cell {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 11px; color: var(--text-2); word-break: break-all;
}

/* ---- 权限标签与操作 ---- */
.perm-tag {
  display: inline-block; padding: 2px 7px; border-radius: 6px;
  font-size: 11px; font-weight: 600; letter-spacing: 0.02em;
  color: var(--text-2); background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--line);
}
.perm-tag.admin { color: #ffd479; background: rgba(255, 196, 90, 0.12); border-color: rgba(255, 196, 90, 0.28); }
.perm-tag.up { color: #7ee0a8; background: rgba(60, 200, 130, 0.1); border-color: rgba(60, 200, 130, 0.24); }
.perm-ops { display: inline-flex; gap: 4px; margin-left: 6px; vertical-align: middle; }
.mini-btn {
  height: 22px; padding: 0 7px; border-radius: 6px; cursor: pointer;
  font: inherit; font-size: 11px; color: var(--text-2);
  background: rgba(255, 255, 255, 0.05); border: 1px solid var(--line);
  transition: color 0.15s, border-color 0.15s, background 0.15s;
}
.mini-btn:hover:not(:disabled) { color: var(--text); border-color: var(--line-2); background: rgba(255, 255, 255, 0.09); }
.mini-btn:disabled { opacity: 0.45; cursor: default; }
.mini-btn.danger:hover:not(:disabled) { color: #ff7a7a; border-color: rgba(255, 122, 122, 0.5); background: rgba(255, 122, 122, 0.1); }
