:root {
  --bg: #05070d;
  --panel: rgba(12, 18, 29, .92);
  --line: rgba(255, 255, 255, .09);
  --line2: rgba(255, 255, 255, .16);
  --text: #e8edf7;
  --muted: #8f9db6;
  --dim: #66748c;
  --accent: #6ea8ff;
  --accent2: #6ee7c7;
  --bad: #ff7b8a;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  background: var(--bg);
  color: var(--text);
  font: 16px/1.65 -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
        "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
.bg-glow {
  position: fixed; inset: -20% -10% auto -10%; height: 70vh; pointer-events: none; z-index: 0;
  background:
    radial-gradient(60% 55% at 28% 18%, rgba(88, 140, 255, .20), transparent 70%),
    radial-gradient(45% 45% at 82% 0%, rgba(64, 224, 180, .11), transparent 70%);
  filter: blur(10px);
}
.bg-grid {
  position: fixed; inset: 0; pointer-events: none; z-index: 0; opacity: .32;
  background-image:
    linear-gradient(rgba(255, 255, 255, .035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .035) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(70% 60% at 50% 0%, #000 30%, transparent 100%);
  -webkit-mask-image: radial-gradient(70% 60% at 50% 0%, #000 30%, transparent 100%);
}

/* ---------------- 登录 ---------------- */
.auth-wrap {
  position: relative; z-index: 1; min-height: 100vh;
  display: grid; place-items: center; padding: 28px;
}
.auth-card {
  width: min(430px, 100%); padding: 40px 38px 28px; margin: 0;
  border: 1px solid var(--line); border-radius: 22px;
  background: linear-gradient(170deg, rgba(20, 30, 50, .86), rgba(8, 13, 22, .94));
  box-shadow: 0 30px 90px rgba(0, 0, 0, .55);
  backdrop-filter: blur(14px);
  animation: rise .5s ease both;
}
.auth-card.center { text-align: center; }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.lock {
  width: 54px; height: 54px; border-radius: 16px; display: grid; place-items: center;
  color: var(--accent); border: 1px solid rgba(110, 168, 255, .3);
  background: radial-gradient(120% 120% at 20% 0%, rgba(110, 168, 255, .18), rgba(110, 168, 255, .04));
  margin-bottom: 22px;
}
.lock svg { width: 27px; height: 27px; }
.eyebrow {
  margin: 0 0 10px; color: var(--muted); font-size: 11.5px;
  letter-spacing: .24em; text-transform: uppercase;
}
.auth-card h1 { margin: 0 0 10px; font-size: 27px; letter-spacing: -.01em; font-weight: 650; }
.lede { margin: 0 0 26px; color: var(--muted); font-size: 14px; }
.field { display: block; margin-bottom: 18px; }
.field span { display: block; font-size: 12.5px; color: var(--muted); margin-bottom: 8px; letter-spacing: .04em; }
.field input {
  width: 100%; padding: 13px 15px; font-size: 16px; color: var(--text);
  background: rgba(255, 255, 255, .04); border: 1px solid var(--line2);
  border-radius: 12px; outline: none; transition: border-color .15s, box-shadow .15s;
}
.field input::placeholder { color: #5a6880; }
.field input:focus { border-color: rgba(110, 168, 255, .65); box-shadow: 0 0 0 4px rgba(110, 168, 255, .12); }
.error {
  margin: 0 0 16px; padding: 9px 12px; font-size: 13.5px; color: var(--bad);
  background: rgba(255, 123, 138, .08); border: 1px solid rgba(255, 123, 138, .25);
  border-radius: 10px;
}
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 10px 16px; font-size: 14px; font-family: inherit; color: var(--text);
  background: rgba(255, 255, 255, .05); border: 1px solid var(--line2);
  border-radius: 11px; cursor: pointer; text-decoration: none;
  transition: background .15s, border-color .15s, transform .1s;
}
.btn:hover { background: rgba(255, 255, 255, .09); }
.btn:active { transform: translateY(1px); }
.btn.primary {
  color: #071019; font-weight: 650; border-color: transparent;
  background: linear-gradient(135deg, #9cc2ff, #6ee7c7);
  box-shadow: 0 8px 26px rgba(110, 168, 255, .22);
}
.btn.primary:hover { filter: brightness(1.05); }
.btn.primary:disabled { opacity: .5; cursor: not-allowed; box-shadow: none; }
.btn.ghost { background: transparent; color: var(--muted); }
.btn.ghost:hover { color: var(--text); }
.btn.wide { width: 100%; padding: 13px; font-size: 15px; }
.foot { margin: 26px 0 0; text-align: center; font-size: 11.5px; color: var(--dim); }

/* ---------------- 列表页 ---------------- */
.wrap {
  position: relative; z-index: 1; max-width: 1180px; margin: 0 auto;
  padding: 30px 24px 70px;
}
.top { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand {
  display: inline-flex; align-items: center; gap: 10px; text-decoration: none;
  font-weight: 600; letter-spacing: .02em; font-size: 15px;
}
.dot {
  width: 8px; height: 8px; border-radius: 50%; background: var(--accent2);
  box-shadow: 0 0 12px rgba(110, 231, 199, .8);
}
.actions { display: flex; align-items: center; gap: 10px; }
.inline { display: inline; margin: 0; }
.hero { margin-top: clamp(38px, 7vh, 76px); }
.hero h1 {
  margin: 8px 0 12px; font-size: clamp(32px, 5vw, 46px);
  line-height: 1.1; letter-spacing: -.025em; font-weight: 680;
}
.grad {
  background: linear-gradient(92deg, #ffffff 10%, #9cc2ff 55%, #6ee7c7 95%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.sub { margin: 0; color: var(--muted); font-size: 14.5px; }
.toolbar {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  margin: 34px 0 20px;
}
.search {
  flex: 1 1 240px; min-width: 200px; padding: 11px 15px; font-size: 14px; font-family: inherit;
  color: var(--text); background: rgba(255, 255, 255, .04);
  border: 1px solid var(--line); border-radius: 11px; outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.search::placeholder { color: #5a6880; }
.search:focus { border-color: rgba(110, 168, 255, .55); box-shadow: 0 0 0 4px rgba(110, 168, 255, .1); }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
  padding: 7px 13px; font-size: 12.5px; font-family: inherit; color: var(--muted);
  background: transparent; border: 1px solid var(--line); border-radius: 999px;
  cursor: pointer; transition: color .15s, border-color .15s, background .15s;
}
.chip:hover { color: var(--text); border-color: var(--line2); }
.chip.active {
  color: #071019; font-weight: 650; border-color: transparent;
  background: linear-gradient(135deg, #9cc2ff, #6ee7c7);
}
.grid {
  display: grid; gap: 16px;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  align-items: stretch;
}
.card {
  position: relative; cursor: pointer;
  display: flex; flex-direction: column; padding: 20px 20px 14px;
  border: 1px solid var(--line); border-radius: 16px;
  background: linear-gradient(165deg, rgba(20, 30, 50, .72), rgba(8, 13, 22, .9));
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.card:hover {
  transform: translateY(-2px); border-color: rgba(110, 168, 255, .34);
  box-shadow: 0 18px 44px rgba(0, 0, 0, .35);
}
.card-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 13px; }
.badge {
  font-size: 10px; letter-spacing: .14em; font-weight: 600; padding: 4px 8px; border-radius: 6px;
  color: #9cc2ff; background: rgba(110, 168, 255, .1);
  border: 1px solid rgba(110, 168, 255, .22);
}
.date { font-size: 11.5px; color: var(--dim); }
.card h3 { margin: 0 0 9px; font-size: 16.5px; line-height: 1.45; font-weight: 620; }
.card h3 { transition: color .15s; }
.card:hover h3 { color: var(--accent); }
.card-hit { position: absolute; inset: 0; z-index: 1; border-radius: 16px; }
.card-hit:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.path {
  margin: 0; font-size: 12px; line-height: 1.5; color: var(--dim);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  word-break: break-all; display: -webkit-box; -webkit-line-clamp: 2;
  -webkit-box-orient: vertical; overflow: hidden;
}
.card-foot {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: 15px; padding-top: 12px; border-top: 1px solid rgba(255, 255, 255, .055);
  font-size: 12px; color: var(--muted);
}
.card-foot form { position: relative; z-index: 2; }
.del {
  padding: 0; font-size: 12px; font-family: inherit; color: var(--dim);
  background: none; border: 0; cursor: pointer; transition: color .15s;
}
.del:hover { color: var(--bad); }
.empty {
  padding: 70px 24px; text-align: center; color: var(--muted);
  border: 1px dashed var(--line2); border-radius: 18px;
}
.empty-icon { font-size: 34px; color: var(--accent); opacity: .8; margin-bottom: 12px; }
.empty h2 { margin: 0 0 8px; font-size: 19px; color: var(--text); }
.empty p { margin: 0 auto; max-width: 460px; font-size: 14px; }
.empty-filter { display: none; padding: 40px 0; text-align: center; color: var(--muted); }
.site-foot {
  display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  margin-top: 64px; padding-top: 18px; border-top: 1px solid var(--line);
  font-size: 11.5px; color: var(--dim);
}

/* ---------------- 上传弹层 ---------------- */
.modal {
  position: fixed; inset: 0; z-index: 50; display: none; place-items: center;
  padding: 20px; background: rgba(3, 6, 12, .74); backdrop-filter: blur(5px);
}
.modal.open { display: grid; }
.panel {
  width: min(580px, 100%); padding: 24px 24px 20px;
  background: #0a101a; border: 1px solid var(--line2); border-radius: 20px;
  box-shadow: 0 30px 90px rgba(0, 0, 0, .6);
  animation: rise .25s ease both;
}
.panel-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.panel-head h2 { margin: 0; font-size: 18px; }
.close {
  width: 30px; height: 30px; font-size: 20px; line-height: 1; color: var(--muted);
  background: transparent; border: 1px solid var(--line); border-radius: 9px; cursor: pointer;
}
.close:hover { color: var(--text); }
.drop {
  padding: 30px 20px; text-align: center; cursor: pointer;
  border: 1.5px dashed rgba(110, 168, 255, .35); border-radius: 14px;
  background: rgba(110, 168, 255, .035); transition: background .15s, border-color .15s;
}
.drop.hover { border-color: var(--accent); background: rgba(110, 168, 255, .09); }
.drop-icon { font-size: 26px; color: var(--accent); margin-bottom: 6px; }
.drop p { margin: 4px 0; font-size: 14px; }
.drop .hint { color: var(--muted); font-size: 12.5px; }
.picked { max-height: 150px; overflow: auto; margin-top: 12px; font-size: 12.5px; color: var(--muted); }
.picked div { padding: 2px 0; font-family: ui-monospace, monospace; word-break: break-all; }
.progress { display: none; height: 6px; margin-top: 16px; background: rgba(255, 255, 255, .08); border-radius: 99px; overflow: hidden; }
.bar { height: 100%; width: 0; background: linear-gradient(90deg, #6ea8ff, #6ee7c7); transition: width .2s; }
.panel-foot { display: flex; align-items: center; gap: 10px; margin-top: 18px; flex-wrap: wrap; }
.spacer { flex: 1; }
.toast {
  position: fixed; left: 50%; bottom: 30px; z-index: 60;
  transform: translate(-50%, 14px); opacity: 0; pointer-events: none;
  padding: 10px 18px; font-size: 13px; color: #071019;
  background: linear-gradient(135deg, #9cc2ff, #6ee7c7); border-radius: 999px;
  box-shadow: 0 14px 40px rgba(0, 0, 0, .45); transition: opacity .25s, transform .25s;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
@media (max-width: 620px) {
  .wrap { padding: 22px 16px 56px; }
  .actions .btn.ghost { display: none; }
  .auth-card { padding: 32px 24px 22px; }
  .card-foot .date { display: none; }
}
