:root {
  --bg: #0b0d10;
  --card: #14171c;
  --card-2: #181c22;
  --line: #242a32;
  --line-soft: #1d2229;
  --text: #e8eaed;
  --text-2: #9aa2af;
  --text-3: #6b7280;
  --accent: #e8eaed;
  --accent-text: #0b0d10;
  --danger: #e5696f;
  --ok: #5ec98a;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 18px 50px rgba(0, 0, 0, .45);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
}

.hidden { display: none !important; }
.mono { font-family: ui-monospace, SFMono-Regular, "JetBrains Mono", Menlo, Consolas, monospace; }

/* 背景 */
.bg { position: fixed; inset: 0; z-index: -1; overflow: hidden; }
.bg-grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(var(--line-soft) 1px, transparent 1px),
    linear-gradient(90deg, var(--line-soft) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 30%, transparent 75%);
  opacity: .5;
}
.bg-glow {
  position: absolute; top: -20%; left: 50%; transform: translateX(-50%);
  width: 720px; height: 420px;
  background: radial-gradient(closest-side, rgba(120, 150, 190, .12), transparent);
  filter: blur(20px);
}

.shell {
  max-width: 720px;
  margin: 0 auto;
  padding: 28px 20px 48px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* 顶栏 */
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 28px;
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand-mark {
  width: 40px; height: 40px; display: grid; place-items: center;
  border: 1px solid var(--line); border-radius: 12px;
  background: var(--card); color: var(--text);
}
.brand-mark svg { width: 22px; height: 22px; }
.brand-text { display: flex; flex-direction: column; }
.brand-name { font-weight: 600; font-size: 16px; letter-spacing: .2px; }
.brand-sub { font-size: 12px; color: var(--text-3); }
.topnav { display: flex; gap: 10px; }

.link-btn {
  font-size: 13px; color: var(--text-2); text-decoration: none;
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 8px 12px; background: var(--card); cursor: pointer;
  transition: color .15s, border-color .15s, background .15s;
}
.link-btn:hover { color: var(--text); border-color: #333b45; }
.link-btn.subtle { background: transparent; border-color: transparent; }
.link-btn.subtle:hover { color: var(--text); }

/* 卡片 */
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 28px;
}
.view { animation: rise .35s ease; }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

.title { font-size: 24px; margin: 0 0 8px; font-weight: 600; letter-spacing: .2px; }
.desc { color: var(--text-2); margin: 0 0 22px; font-size: 14px; }

/* 表单 */
.form { display: flex; flex-direction: column; gap: 16px; }
.field { display: flex; flex-direction: column; gap: 8px; }
.field-label { font-size: 13px; color: var(--text-2); }
.field input {
  background: var(--card-2); border: 1px solid var(--line);
  border-radius: var(--radius-sm); color: var(--text);
  padding: 12px 14px; font-size: 15px; outline: none;
  transition: border-color .15s;
}
.field input:focus { border-color: #3a4350; }
.field input::placeholder { color: var(--text-3); }

.btn {
  border: 1px solid transparent; border-radius: var(--radius-sm);
  padding: 12px 16px; font-size: 15px; cursor: pointer;
  transition: opacity .15s, background .15s, border-color .15s;
}
.btn.primary { background: var(--accent); color: var(--accent-text); font-weight: 600; }
.btn.primary:hover { opacity: .9; }
.btn.primary:disabled { opacity: .5; cursor: not-allowed; }
.btn.ghost {
  background: transparent; border-color: var(--line); color: var(--text-2);
  padding: 8px 12px; font-size: 13px;
}
.btn.ghost:hover { color: var(--text); border-color: #333b45; }

.form-msg { margin: 4px 0 0; font-size: 13px; min-height: 18px; }
.form-msg.err { color: var(--danger); }
.form-msg.ok { color: var(--ok); }

/* 拖拽区 */
.dropzone {
  border-style: dashed;
  padding: 40px 28px;
  margin-bottom: 20px;
  cursor: pointer;
  transition: border-color .15s, background .15s;
}
.dropzone:hover, .dropzone:focus-visible { border-color: #3a4350; }
.dropzone.dragover { border-color: var(--ok); background: rgba(94, 201, 138, .06); }
.dz-inner { text-align: center; }
.dz-icon { width: 40px; height: 40px; color: var(--text-3); margin-bottom: 14px; }
.dz-title { margin: 0 0 6px; font-size: 16px; font-weight: 500; }
.dz-hint { margin: 0; font-size: 13px; color: var(--text-3); }

/* 列表 */
.section { padding: 22px 28px; }
.section-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.section-title { font-size: 15px; font-weight: 600; margin: 0; }
.file-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.empty-hint { color: var(--text-3); font-size: 13px; text-align: center; padding: 12px 0; margin: 0; }

.file-item {
  display: flex; gap: 14px; align-items: flex-start;
  border: 1px solid var(--line-soft); border-radius: var(--radius-sm);
  padding: 14px; background: var(--card-2);
}
.thumb {
  width: 64px; height: 64px; border-radius: 10px; overflow: hidden;
  background: #0e1114; border: 1px solid var(--line-soft); flex-shrink: 0;
  display: grid; place-items: center;
}
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb .file-ext { font-size: 12px; color: var(--text-3); }
.meta { flex: 1; min-width: 0; }
.meta-name { font-size: 14px; word-break: break-all; margin-bottom: 2px; }
.meta-sub { font-size: 12px; color: var(--text-3); }
.status { font-size: 12px; flex-shrink: 0; }
.status.uploading { color: var(--text-2); }
.status.ok { color: var(--ok); }
.status.err { color: var(--danger); }

.progress { margin-top: 10px; height: 4px; border-radius: 4px; background: var(--line); overflow: hidden; }
.progress-bar { height: 100%; width: 0; background: var(--text-2); border-radius: 4px; transition: width .2s; }

.result { margin-top: 12px; display: flex; flex-direction: column; gap: 8px; }
.link-row { display: flex; gap: 8px; }
.link-input {
  flex: 1; min-width: 0; background: #0e1114; border: 1px solid var(--line-soft);
  border-radius: 8px; color: var(--text-2); padding: 8px 10px; font-size: 12px;
  outline: none;
}

/* 底部 */
.footer {
  margin-top: 28px; display: flex; gap: 8px; justify-content: center;
  font-size: 12px; color: var(--text-3);
}
.footer .dot { opacity: .5; }

@media (max-width: 520px) {
  .card, .section { padding: 20px 18px; }
  .title { font-size: 20px; }
  .link-row { flex-direction: column; }
}
