/* ============================================================
   LiquidDrive · 液态玻璃设计系统
   ============================================================ */
:root {
  --glass: rgba(255, 255, 255, 0.075);
  --glass-2: rgba(255, 255, 255, 0.12);
  --glass-strong: rgba(255, 255, 255, 0.18);
  --stroke: rgba(255, 255, 255, 0.22);
  --stroke-soft: rgba(255, 255, 255, 0.12);
  --txt: #eef3ff;
  --txt-dim: #a7b3cc;
  --txt-mute: #6f7d99;
  --c1: #67e8f9;
  --c2: #818cf8;
  --c3: #f472b6;
  --c4: #34d399;
  --danger: #ff5d6c;
  --warn: #ffb020;
  --radius: 22px;
  --blur: 26px;
  --shadow: 0 18px 50px -12px rgba(3, 7, 20, 0.75);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body { height: 100%; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB",
               "Microsoft YaHei", "Segoe UI", system-ui, sans-serif,
               "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", "Twemoji Mozilla";
  color: var(--txt);
  background: #05070f;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ---------- 背景光斑 ---------- */
.bg {
  position: fixed;
  inset: 0;
  z-index: -2;
  overflow: hidden;
  background:
    radial-gradient(1200px 700px at 12% -10%, #1b2a5e 0%, transparent 55%),
    radial-gradient(900px 600px at 92% 8%, #2a1147 0%, transparent 52%),
    radial-gradient(800px 700px at 50% 108%, #0b3b46 0%, transparent 55%),
    linear-gradient(160deg, #05070f 0%, #070b18 40%, #05070d 100%);
}
.bg span {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: .55;
  animation: float 22s ease-in-out infinite;
  will-change: transform;
}
.bg span:nth-child(1) { width: 520px; height: 520px; left: -8%; top: -12%; background: #2563eb; }
.bg span:nth-child(2) { width: 460px; height: 460px; right: -6%; top: 6%; background: #7c3aed; animation-delay: -6s; }
.bg span:nth-child(3) { width: 400px; height: 400px; left: 28%; bottom: -16%; background: #06b6d4; animation-delay: -12s; }
.bg span:nth-child(4) { width: 320px; height: 320px; right: 18%; bottom: 4%; background: #db2777; animation-delay: -18s; opacity: .35; }
@keyframes float {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
  33%      { transform: translate3d(60px, -40px, 0) scale(1.08); }
  66%      { transform: translate3d(-45px, 35px, 0) scale(.95); }
}
.grain {
  position: fixed; inset: 0; z-index: -1; pointer-events: none; opacity: .045;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='140' height='140'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3'/></filter><rect width='140' height='140' filter='url(%23n)' opacity='0.55'/></svg>");
}

/* ---------- 玻璃基类 ---------- */
.glass {
  position: relative;
  background: linear-gradient(135deg, rgba(255,255,255,.10), rgba(255,255,255,.035) 45%, rgba(255,255,255,.06));
  border: 1px solid var(--stroke);
  border-radius: var(--radius);
  backdrop-filter: blur(var(--blur)) saturate(175%);
  -webkit-backdrop-filter: blur(var(--blur)) saturate(175%);
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255,255,255,.28), inset 0 -1px 0 rgba(255,255,255,.06);
}
.glass::after {
  content: "";
  position: absolute; inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: radial-gradient(120% 60% at 20% -20%, rgba(255,255,255,.28), transparent 60%);
  opacity: .7;
  mix-blend-mode: screen;
}
.glass > * { position: relative; z-index: 1; }

/* ---------- 顶栏 ---------- */
.topbar {
  position: sticky;
  top: 14px;
  z-index: 50;
  margin: 14px auto 0;
  max-width: 1180px;
  padding: 12px 18px;
  display: flex;
  align-items: center;
  gap: 14px;
  border-radius: 18px;
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--txt); }
.brand .logo {
  width: 36px; height: 36px; border-radius: 12px;
  background: conic-gradient(from 140deg, var(--c1), var(--c2), var(--c3), var(--c1));
  box-shadow: 0 6px 20px rgba(129,140,248,.45), inset 0 1px 2px rgba(255,255,255,.7);
  display: grid; place-items: center;
  font-weight: 800; font-size: 17px; color: #0a1024;
}
.brand b { font-size: 17px; letter-spacing: .4px; }
.brand small { display: block; color: var(--txt-mute); font-size: 11px; font-weight: 400; letter-spacing: .2px; }

.nav { margin-left: auto; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.nav a {
  color: var(--txt-dim); text-decoration: none; font-size: 13.5px;
  padding: 8px 13px; border-radius: 11px; border: 1px solid transparent;
  transition: .22s ease; white-space: nowrap;
}
.nav a:hover { color: #fff; background: var(--glass-2); border-color: var(--stroke-soft); transform: translateY(-1px); }
.nav a.admin-link { border-color: var(--stroke-soft); background: var(--glass); color: #cfd8ff; }
.nav a.admin-link:hover { box-shadow: 0 8px 24px -6px rgba(129,140,248,.6); }

/* ---------- 容器 ---------- */
.wrap { max-width: 1180px; margin: 0 auto; padding: 26px 20px 70px; }

/* ---------- Hero ---------- */
.hero { text-align: center; padding: 46px 18px 26px; }
.hero h1 {
  margin: 0 0 14px;
  font-size: clamp(30px, 5.4vw, 52px);
  line-height: 1.14;
  letter-spacing: -.5px;
  font-weight: 800;
  background: linear-gradient(100deg, #ffffff 8%, #b9d9ff 32%, #c4b5fd 58%, #f9c6e6 82%, #ffffff 100%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 8px 28px rgba(120,150,255,.28));
}
.hero p { margin: 0 auto; max-width: 620px; color: var(--txt-dim); font-size: 15px; line-height: 1.85; }

.chips { display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; margin-top: 22px; }
.chip {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 8px 15px; font-size: 12.5px; color: #dbe4ff;
  border-radius: 999px; border: 1px solid var(--stroke-soft);
  background: var(--glass); backdrop-filter: blur(14px);
}
.chip b { color: #fff; font-variant-numeric: tabular-nums; }

.notice {
  margin: 20px auto 0; max-width: 820px; padding: 13px 17px;
  font-size: 13.5px; color: #ffe9c2; line-height: 1.7;
  border-left: 3px solid var(--warn);
}

/* ---------- 上传 ---------- */
.uploader { margin: 30px auto 0; max-width: 900px; padding: 26px; }
.dropzone {
  border: 1.6px dashed rgba(255,255,255,.28);
  border-radius: 18px;
  padding: 38px 22px;
  text-align: center;
  cursor: pointer;
  transition: .25s ease;
  background: linear-gradient(180deg, rgba(255,255,255,.04), rgba(255,255,255,.01));
}
.dropzone:hover { border-color: rgba(148,180,255,.75); background: rgba(129,140,248,.09); }
.dropzone.drag {
  border-color: var(--c1);
  background: rgba(103,232,249,.14);
  box-shadow: inset 0 0 50px rgba(103,232,249,.16), 0 0 0 4px rgba(103,232,249,.12);
  transform: scale(1.006);
}
.dz-icon { font-size: 40px; line-height: 1; margin-bottom: 12px; filter: drop-shadow(0 6px 16px rgba(103,232,249,.45)); }
.dz-t { font-size: 15.5px; font-weight: 600; margin-bottom: 6px; }
.dz-s { font-size: 12.5px; color: var(--txt-mute); }

.up-list { margin-top: 16px; display: grid; gap: 8px; }
.up-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 13px; border-radius: 12px; font-size: 13px;
  background: rgba(255,255,255,.05); border: 1px solid var(--stroke-soft);
}
.up-item .nm { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.up-item .bar { width: 110px; height: 5px; border-radius: 99px; background: rgba(255,255,255,.12); overflow: hidden; }
.up-item .bar i { display: block; height: 100%; width: 0%; border-radius: 99px; background: linear-gradient(90deg, var(--c1), var(--c2)); transition: width .2s; }
.up-item .ok { color: var(--c4); font-size: 12px; }
.up-item .err { color: var(--danger); font-size: 12px; }

/* ---------- 工具条 ---------- */
.toolbar { display: flex; align-items: center; gap: 12px; margin: 40px 2px 16px; flex-wrap: wrap; }
.toolbar h2 { font-size: 17px; margin: 0; font-weight: 700; letter-spacing: .3px; }
.toolbar .count { font-size: 12px; color: var(--txt-mute); }
.search {
  margin-left: auto; display: flex; align-items: center; gap: 8px;
  padding: 9px 14px; border-radius: 13px; background: var(--glass);
  border: 1px solid var(--stroke-soft); backdrop-filter: blur(16px);
  transition: .2s;
}
.search:focus-within { border-color: rgba(148,180,255,.7); box-shadow: 0 0 0 4px rgba(129,140,248,.14); }
.search input {
  border: 0; outline: 0; background: transparent; color: var(--txt);
  font-size: 13.5px; width: 190px; font-family: inherit;
}
.search input::placeholder { color: var(--txt-mute); }

/* ---------- 文件网格 ---------- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(268px, 1fr)); gap: 14px; }
.card {
  padding: 17px 18px 15px;
  border-radius: 18px;
  display: flex; flex-direction: column; gap: 12px;
  transition: transform .26s cubic-bezier(.2,.8,.25,1), box-shadow .26s, border-color .26s;
  animation: rise .45s cubic-bezier(.2,.8,.25,1) both;
}
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.card:hover {
  transform: translateY(-5px);
  border-color: rgba(160,190,255,.55);
  box-shadow: 0 26px 60px -20px rgba(90,120,255,.55), inset 0 1px 0 rgba(255,255,255,.4);
}
.card .thumb {
  width: 42px; height: 42px; border-radius: 13px; display: grid; place-items: center;
  font-size: 20px;
  background: linear-gradient(150deg, rgba(255,255,255,.2), rgba(255,255,255,.05));
  border: 1px solid var(--stroke-soft);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.4);
}
.card .fname {
  font-size: 14px; font-weight: 600; line-height: 1.45; word-break: break-all;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.card .fnote { font-size: 12px; color: var(--txt-dim); line-height: 1.6; }
.card .meta { display: flex; gap: 10px; flex-wrap: wrap; font-size: 11.5px; color: var(--txt-mute); }
.card .meta span { display: inline-flex; align-items: center; gap: 4px; }
.card .acts { display: flex; gap: 8px; margin-top: auto; }
.btn {
  border: 1px solid var(--stroke-soft); background: var(--glass-2); color: #eaf0ff;
  padding: 8px 14px; border-radius: 11px; font-size: 12.5px; cursor: pointer;
  font-family: inherit; transition: .2s; text-decoration: none; display: inline-flex;
  align-items: center; gap: 6px; justify-content: center; white-space: nowrap;
}
.btn:hover { background: rgba(255,255,255,.2); transform: translateY(-1px); }
.btn.primary {
  background: linear-gradient(135deg, #5eead4, #818cf8 55%, #c084fc);
  color: #08101f; font-weight: 700; border-color: transparent;
  box-shadow: 0 12px 30px -10px rgba(129,140,248,.9);
}
.btn.primary:hover { filter: brightness(1.08); }
.btn.ghost { background: transparent; }
.btn.danger { color: #ffc9cf; border-color: rgba(255,93,108,.4); background: rgba(255,93,108,.12); }
.btn.danger:hover { background: rgba(255,93,108,.24); }
.btn.sm { padding: 6px 11px; font-size: 12px; border-radius: 10px; }
.btn.grow { flex: 1; }

.lock-badge { font-size: 11px; color: #ffd479; }

/* ---------- 链接区 ---------- */
.links { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 12px; margin-top: 12px; }
.link-card {
  display: flex; align-items: center; gap: 12px; padding: 14px 16px;
  border-radius: 15px; text-decoration: none; color: var(--txt);
  transition: .25s;
}
.link-card:hover { transform: translateY(-3px); border-color: rgba(160,190,255,.5); }
.link-card .ico { font-size: 20px; width: 38px; height: 38px; display: grid; place-items: center; border-radius: 11px; background: rgba(255,255,255,.09); }
.link-card .t { font-size: 13.5px; font-weight: 600; }
.link-card .d { font-size: 11.5px; color: var(--txt-mute); margin-top: 2px; }

/* ---------- 空态 / 页脚 ---------- */
.empty { text-align: center; padding: 60px 20px; color: var(--txt-mute); font-size: 13.5px; }
.empty .e { font-size: 42px; margin-bottom: 12px; opacity: .6; }

footer { text-align: center; padding: 34px 20px 46px; color: var(--txt-mute); font-size: 12px; line-height: 2; }
footer a { color: var(--txt-dim); text-decoration: none; }
footer a:hover { color: #fff; }

/* ---------- Toast ---------- */
#toast { position: fixed; left: 50%; bottom: 34px; transform: translateX(-50%) translateY(20px); z-index: 999; opacity: 0; transition: .3s; pointer-events: none; }
#toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
#toast .t {
  padding: 12px 22px; border-radius: 14px; font-size: 13.5px;
  background: rgba(18,24,40,.86); border: 1px solid var(--stroke);
  backdrop-filter: blur(20px); box-shadow: var(--shadow); color: #eaf0ff;
}
#toast.err .t { color: #ffc9cf; border-color: rgba(255,93,108,.5); }
#toast.ok .t { color: #b8ffe4; border-color: rgba(52,211,153,.5); }

/* ---------- 登录页 ---------- */
.center-page { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.login-card { width: 100%; max-width: 400px; padding: 34px 30px 28px; border-radius: 26px; }
.login-card .lg { text-align: center; margin-bottom: 22px; }
.login-card .lg .ico {
  width: 56px; height: 56px; border-radius: 18px; margin: 0 auto 14px;
  background: conic-gradient(from 140deg, var(--c1), var(--c2), var(--c3), var(--c1));
  display: grid; place-items: center; font-size: 26px;
  box-shadow: 0 14px 36px -8px rgba(129,140,248,.85), inset 0 1px 3px rgba(255,255,255,.7);
}
.login-card h1 { font-size: 19px; margin: 0 0 6px; letter-spacing: .3px; }
.login-card .sub { font-size: 12.5px; color: var(--txt-mute); }

.field { margin-bottom: 14px; }
.field label { display: block; font-size: 12px; color: var(--txt-dim); margin-bottom: 7px; letter-spacing: .3px; }
.input {
  width: 100%; padding: 13px 15px; border-radius: 13px; font-size: 14px; font-family: inherit;
  background: rgba(255,255,255,.07); border: 1px solid var(--stroke-soft);
  color: var(--txt); outline: 0; transition: .2s;
}
.input:focus { border-color: rgba(148,180,255,.75); background: rgba(255,255,255,.11); box-shadow: 0 0 0 4px rgba(129,140,248,.16); }
.input::placeholder { color: var(--txt-mute); }

.alert {
  padding: 12px 15px; border-radius: 13px; font-size: 12.8px; line-height: 1.7;
  margin-bottom: 16px; border: 1px solid transparent;
}
.alert.err { background: rgba(255,93,108,.14); border-color: rgba(255,93,108,.45); color: #ffd0d5; animation: shake .4s; }
.alert.warn { background: rgba(255,176,32,.13); border-color: rgba(255,176,32,.42); color: #ffe0a8; }
@keyframes shake {
  0%,100% { transform: translateX(0); }
  22% { transform: translateX(-7px); }
  44% { transform: translateX(6px); }
  66% { transform: translateX(-4px); }
  88% { transform: translateX(3px); }
}
.pulse-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--danger); margin-right: 6px; animation: blip 1.1s infinite; }
@keyframes blip { 0%,100% { opacity: 1; box-shadow: 0 0 0 0 rgba(255,93,108,.7); } 50% { opacity: .5; box-shadow: 0 0 0 6px rgba(255,93,108,0); } }

/* ---------- 解锁页 ---------- */
.unlock-wrap { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.unlock-card { max-width: 420px; width: 100%; padding: 30px 28px; text-align: center; }
.unlock-card .fi { font-size: 40px; margin-bottom: 10px; }
.unlock-card h2 { font-size: 16px; margin: 0 0 6px; word-break: break-all; }
.unlock-card p { font-size: 12.5px; color: var(--txt-mute); }

@media (max-width: 720px) {
  .topbar { top: 8px; margin: 8px 8px 0; padding: 10px 12px; }
  .nav { gap: 4px; }
  .nav a { padding: 7px 9px; font-size: 12.5px; }
  .wrap { padding: 16px 12px 50px; }
  .hero { padding: 28px 8px 14px; }
  .uploader { padding: 16px; }
  .search { margin-left: 0; width: 100%; }
  .search input { width: 100%; }
  .grid { grid-template-columns: 1fr; }
  .brand small { display: none; }
}
